Ruby 3.2.0dev (2022-06-11 revision 0e2c01bd094617f5c82759bdab03bb786ce89d56)
rb_mjit_min_header-3.2.0.h
1#ifdef __GNUC__
2# pragma GCC system_header
3#endif
4#define ALWAYS_INLINE(x) __attribute__ ((__always_inline__)) x
5typedef __builtin_va_list __gnuc_va_list;
6typedef __gnuc_va_list va_list;
7
8typedef long unsigned int size_t;
9typedef unsigned char __u_char;
10typedef unsigned short int __u_short;
11typedef unsigned int __u_int;
12typedef unsigned long int __u_long;
13typedef signed char __int8_t;
14typedef unsigned char __uint8_t;
15typedef signed short int __int16_t;
16typedef unsigned short int __uint16_t;
17typedef signed int __int32_t;
18typedef unsigned int __uint32_t;
19typedef signed long int __int64_t;
20typedef unsigned long int __uint64_t;
21typedef __int8_t __int_least8_t;
22typedef __uint8_t __uint_least8_t;
23typedef __int16_t __int_least16_t;
24typedef __uint16_t __uint_least16_t;
25typedef __int32_t __int_least32_t;
26typedef __uint32_t __uint_least32_t;
27typedef __int64_t __int_least64_t;
28typedef __uint64_t __uint_least64_t;
29typedef long int __quad_t;
30typedef unsigned long int __u_quad_t;
31typedef long int __intmax_t;
32typedef unsigned long int __uintmax_t;
33typedef unsigned long int __dev_t;
34typedef unsigned int __uid_t;
35typedef unsigned int __gid_t;
36typedef unsigned long int __ino_t;
37typedef unsigned long int __ino64_t;
38typedef unsigned int __mode_t;
39typedef unsigned long int __nlink_t;
40typedef long int __off_t;
41typedef long int __off64_t;
42typedef int __pid_t;
43typedef struct { int __val[2]; } __fsid_t;
44typedef long int __clock_t;
45typedef unsigned long int __rlim_t;
46typedef unsigned long int __rlim64_t;
47typedef unsigned int __id_t;
48typedef long int __time_t;
49typedef unsigned int __useconds_t;
50typedef long int __suseconds_t;
51typedef long int __suseconds64_t;
52typedef int __daddr_t;
53typedef int __key_t;
54typedef int __clockid_t;
55typedef void * __timer_t;
56typedef long int __blksize_t;
57typedef long int __blkcnt_t;
58typedef long int __blkcnt64_t;
59typedef unsigned long int __fsblkcnt_t;
60typedef unsigned long int __fsblkcnt64_t;
61typedef unsigned long int __fsfilcnt_t;
62typedef unsigned long int __fsfilcnt64_t;
63typedef long int __fsword_t;
64typedef long int __ssize_t;
65typedef long int __syscall_slong_t;
66typedef unsigned long int __syscall_ulong_t;
67typedef __off64_t __loff_t;
68typedef char *__caddr_t;
69typedef long int __intptr_t;
70typedef unsigned int __socklen_t;
71typedef int __sig_atomic_t;
72typedef struct
73{
74 int __count;
75 union
76 {
77 unsigned int __wch;
78 char __wchb[4];
79 } __value;
81typedef struct _G_fpos_t
82{
83 __off_t __pos;
84 __mbstate_t __state;
85} __fpos_t;
86typedef struct _G_fpos64_t
87{
88 __off64_t __pos;
89 __mbstate_t __state;
91struct _IO_FILE;
92typedef struct _IO_FILE __FILE;
93struct _IO_FILE;
94typedef struct _IO_FILE FILE;
95struct _IO_FILE;
96struct _IO_marker;
97struct _IO_codecvt;
98struct _IO_wide_data;
99typedef void _IO_lock_t;
100struct _IO_FILE
101{
102 int _flags;
103 char *_IO_read_ptr;
104 char *_IO_read_end;
105 char *_IO_read_base;
106 char *_IO_write_base;
107 char *_IO_write_ptr;
108 char *_IO_write_end;
109 char *_IO_buf_base;
110 char *_IO_buf_end;
111 char *_IO_save_base;
112 char *_IO_backup_base;
113 char *_IO_save_end;
114 struct _IO_marker *_markers;
115 struct _IO_FILE *_chain;
116 int _fileno;
117 int _flags2;
118 __off_t _old_offset;
119 unsigned short _cur_column;
120 signed char _vtable_offset;
121 char _shortbuf[1];
122 _IO_lock_t *_lock;
123 __off64_t _offset;
124 struct _IO_codecvt *_codecvt;
125 struct _IO_wide_data *_wide_data;
126 struct _IO_FILE *_freeres_list;
127 void *_freeres_buf;
128 size_t __pad5;
129 int _mode;
130 char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
131};
132typedef __ssize_t cookie_read_function_t (void *__cookie, char *__buf,
133 size_t __nbytes);
134typedef __ssize_t cookie_write_function_t (void *__cookie, const char *__buf,
135 size_t __nbytes);
136typedef int cookie_seek_function_t (void *__cookie, __off64_t *__pos, int __w);
137typedef int cookie_close_function_t (void *__cookie);
138typedef struct _IO_cookie_io_functions_t
139{
140 cookie_read_function_t *read;
141 cookie_write_function_t *write;
142 cookie_seek_function_t *seek;
143 cookie_close_function_t *close;
145typedef __off_t off_t;
146typedef __off64_t off64_t;
147typedef __ssize_t ssize_t;
148typedef __fpos_t fpos_t;
149typedef __fpos64_t fpos64_t;
150extern FILE *stdin;
151extern FILE *stdout;
152extern FILE *stderr;
153extern int remove (const char *__filename) __attribute__ ((__nothrow__ , __leaf__));
154extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ , __leaf__));
155extern int renameat (int __oldfd, const char *__old, int __newfd,
156 const char *__new) __attribute__ ((__nothrow__ , __leaf__));
157extern int renameat2 (int __oldfd, const char *__old, int __newfd,
158 const char *__new, unsigned int __flags) __attribute__ ((__nothrow__ , __leaf__));
159extern int fclose (FILE *__stream);
160extern FILE *tmpfile (void)
161 __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__));
162extern FILE *tmpfile64 (void)
163 __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__));
164extern char *tmpnam (char[20]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
165extern char *tmpnam_r (char __s[20]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
166extern char *tempnam (const char *__dir, const char *__pfx)
167 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__malloc__ (__builtin_free, 1)));
168extern int fflush (FILE *__stream);
169extern int fflush_unlocked (FILE *__stream);
170extern int fcloseall (void);
171extern FILE *fopen (const char *__restrict __filename,
172 const char *__restrict __modes)
173 __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__));
174extern FILE *freopen (const char *__restrict __filename,
175 const char *__restrict __modes,
176 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
177extern FILE *fopen64 (const char *__restrict __filename,
178 const char *__restrict __modes)
179 __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__));
180extern FILE *freopen64 (const char *__restrict __filename,
181 const char *__restrict __modes,
182 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
183extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__ , __leaf__))
184 __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__));
185extern FILE *fopencookie (void *__restrict __magic_cookie,
186 const char *__restrict __modes,
187 cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__ , __leaf__))
188 __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__));
189extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
190 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__));
191extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ , __leaf__))
192 __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__));
193extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
194extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
195 int __modes, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
196extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
197 size_t __size) __attribute__ ((__nothrow__ , __leaf__));
198extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
199extern int fprintf (FILE *__restrict __stream,
200 const char *__restrict __format, ...);
201extern int printf (const char *__restrict __format, ...);
202extern int sprintf (char *__restrict __s,
203 const char *__restrict __format, ...) __attribute__ ((__nothrow__));
204extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,
205 __gnuc_va_list __arg);
206extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg);
207extern int vsprintf (char *__restrict __s, const char *__restrict __format,
208 __gnuc_va_list __arg) __attribute__ ((__nothrow__));
209extern int snprintf (char *__restrict __s, size_t __maxlen,
210 const char *__restrict __format, ...)
211 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
212extern int vsnprintf (char *__restrict __s, size_t __maxlen,
213 const char *__restrict __format, __gnuc_va_list __arg)
214 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
215extern int vasprintf (char **__restrict __ptr, const char *__restrict __f,
216 __gnuc_va_list __arg)
217 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__));
218extern int __asprintf (char **__restrict __ptr,
219 const char *__restrict __fmt, ...)
220 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
221extern int asprintf (char **__restrict __ptr,
222 const char *__restrict __fmt, ...)
223 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
224extern int vdprintf (int __fd, const char *__restrict __fmt,
225 __gnuc_va_list __arg)
226 __attribute__ ((__format__ (__printf__, 2, 0)));
227extern int dprintf (int __fd, const char *__restrict __fmt, ...)
228 __attribute__ ((__format__ (__printf__, 2, 3)));
229extern int fscanf (FILE *__restrict __stream,
230 const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
231extern int scanf (const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
232extern int sscanf (const char *__restrict __s,
233 const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__));
234extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf") __attribute__ ((__warn_unused_result__));
235extern int scanf (const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf") __attribute__ ((__warn_unused_result__));
236extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__ , __leaf__));
237extern int vfscanf (FILE *__restrict __s, const char *__restrict __format,
238 __gnuc_va_list __arg)
239 __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__));
240extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg)
241 __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__));
242extern int vsscanf (const char *__restrict __s,
243 const char *__restrict __format, __gnuc_va_list __arg)
244 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__scanf__, 2, 0)));
245extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf")
246 __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__));
247extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf")
248 __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__));
249extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__ , __leaf__))
250 __attribute__ ((__format__ (__scanf__, 2, 0)));
251extern int fgetc (FILE *__stream);
252extern int getc (FILE *__stream);
253extern int getchar (void);
254extern int getc_unlocked (FILE *__stream);
255extern int getchar_unlocked (void);
256extern int fgetc_unlocked (FILE *__stream);
257extern int fputc (int __c, FILE *__stream);
258extern int putc (int __c, FILE *__stream);
259extern int putchar (int __c);
260extern int fputc_unlocked (int __c, FILE *__stream);
261extern int putc_unlocked (int __c, FILE *__stream);
262extern int putchar_unlocked (int __c);
263extern int getw (FILE *__stream);
264extern int putw (int __w, FILE *__stream);
265extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
266 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
267extern char *fgets_unlocked (char *__restrict __s, int __n,
268 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__))
269 __attribute__ ((__access__ (__write_only__, 1, 2)));
270extern __ssize_t __getdelim (char **__restrict __lineptr,
271 size_t *__restrict __n, int __delimiter,
272 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
273extern __ssize_t getdelim (char **__restrict __lineptr,
274 size_t *__restrict __n, int __delimiter,
275 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
276extern __ssize_t getline (char **__restrict __lineptr,
277 size_t *__restrict __n,
278 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
279extern int fputs (const char *__restrict __s, FILE *__restrict __stream);
280extern int puts (const char *__s);
281extern int ungetc (int __c, FILE *__stream);
282extern size_t fread (void *__restrict __ptr, size_t __size,
283 size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
284extern size_t fwrite (const void *__restrict __ptr, size_t __size,
285 size_t __n, FILE *__restrict __s);
286extern int fputs_unlocked (const char *__restrict __s,
287 FILE *__restrict __stream);
288extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
289 size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
290extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
291 size_t __n, FILE *__restrict __stream);
292extern int fseek (FILE *__stream, long int __off, int __whence);
293extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__));
294extern void rewind (FILE *__stream);
295extern int fseeko (FILE *__stream, __off_t __off, int __whence);
296extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__));
297extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
298extern int fsetpos (FILE *__stream, const fpos_t *__pos);
299extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
300extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__));
301extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
302extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos);
303extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
304extern int feof (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
305extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
306extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
307extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
308extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
309extern void perror (const char *__s);
310extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
311extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
312extern int pclose (FILE *__stream);
313extern FILE *popen (const char *__command, const char *__modes)
314 __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (pclose, 1))) __attribute__ ((__warn_unused_result__));
315extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__))
316 __attribute__ ((__access__ (__write_only__, 1)));
317extern char *cuserid (char *__s)
318 __attribute__ ((__access__ (__write_only__, 1)));
319struct obstack;
320extern int obstack_printf (struct obstack *__restrict __obstack,
321 const char *__restrict __format, ...)
322 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3)));
323extern int obstack_vprintf (struct obstack *__restrict __obstack,
324 const char *__restrict __format,
325 __gnuc_va_list __args)
326 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0)));
327extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
328extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
329extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
330extern int __uflow (FILE *);
331extern int __overflow (FILE *, int);
332extern __inline __attribute__ ((__gnu_inline__)) int
333getchar (void)
334{
335 return getc (stdin);
336}
337extern __inline __attribute__ ((__gnu_inline__)) int
338fgetc_unlocked (FILE *__fp)
339{
340 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
341}
342extern __inline __attribute__ ((__gnu_inline__)) int
343getc_unlocked (FILE *__fp)
344{
345 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
346}
347extern __inline __attribute__ ((__gnu_inline__)) int
348getchar_unlocked (void)
349{
350 return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
351}
352extern __inline __attribute__ ((__gnu_inline__)) int
353putchar (int __c)
354{
355 return putc (__c, stdout);
356}
357extern __inline __attribute__ ((__gnu_inline__)) int
358fputc_unlocked (int __c, FILE *__stream)
359{
360 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
361}
362extern __inline __attribute__ ((__gnu_inline__)) int
363putc_unlocked (int __c, FILE *__stream)
364{
365 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
366}
367extern __inline __attribute__ ((__gnu_inline__)) int
368putchar_unlocked (int __c)
369{
370 return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
371}
372extern __inline __attribute__ ((__gnu_inline__)) __ssize_t
373getline (char **__lineptr, size_t *__n, FILE *__stream)
374{
375 return __getdelim (__lineptr, __n, '\n', __stream);
376}
377extern __inline __attribute__ ((__gnu_inline__)) int
378__attribute__ ((__nothrow__ , __leaf__)) feof_unlocked (FILE *__stream)
379{
380 return (((__stream)->_flags & 0x0010) != 0);
381}
382extern __inline __attribute__ ((__gnu_inline__)) int
383__attribute__ ((__nothrow__ , __leaf__)) ferror_unlocked (FILE *__stream)
384{
385 return (((__stream)->_flags & 0x0020) != 0);
386}
387extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,
388 const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__))
389 __attribute__ ((__access__ (__write_only__, 1, 3)));
390extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
391 const char *__restrict __format,
392 __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__))
393 __attribute__ ((__access__ (__write_only__, 1, 3)));
394extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
395__attribute__ ((__nothrow__ , __leaf__)) sprintf (char *__restrict __s, const char *__restrict __fmt, ...)
396{
397 return __builtin___sprintf_chk (__s, 2 - 1,
398 __builtin_object_size (__s, 2 > 1), __fmt,
399 __builtin_va_arg_pack ());
400}
401extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
402__attribute__ ((__nothrow__ , __leaf__)) vsprintf (char *__restrict __s, const char *__restrict __fmt, __gnuc_va_list __ap)
403{
404 return __builtin___vsprintf_chk (__s, 2 - 1,
405 __builtin_object_size (__s, 2 > 1), __fmt, __ap);
406}
407extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,
408 size_t __slen, const char *__restrict __format,
409 ...) __attribute__ ((__nothrow__ , __leaf__))
410 __attribute__ ((__access__ (__write_only__, 1, 2)));
411extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
412 size_t __slen, const char *__restrict __format,
413 __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__));
414extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
415__attribute__ ((__nothrow__ , __leaf__)) snprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, ...)
416{
417 return __builtin___snprintf_chk (__s, __n, 2 - 1,
418 __builtin_object_size (__s, 2 > 1), __fmt,
419 __builtin_va_arg_pack ());
420}
421extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
422__attribute__ ((__nothrow__ , __leaf__)) vsnprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, __gnuc_va_list __ap)
423{
424 return __builtin___vsnprintf_chk (__s, __n, 2 - 1,
425 __builtin_object_size (__s, 2 > 1), __fmt, __ap);
426}
427extern int __fprintf_chk (FILE *__restrict __stream, int __flag,
428 const char *__restrict __format, ...);
429extern int __printf_chk (int __flag, const char *__restrict __format, ...);
430extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,
431 const char *__restrict __format, __gnuc_va_list __ap);
432extern int __vprintf_chk (int __flag, const char *__restrict __format,
433 __gnuc_va_list __ap);
434extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
435fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
436{
437 return __fprintf_chk (__stream, 2 - 1, __fmt,
438 __builtin_va_arg_pack ());
439}
440extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
441printf (const char *__restrict __fmt, ...)
442{
443 return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ());
444}
445extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
446vprintf (const char *__restrict __fmt, __gnuc_va_list __ap)
447{
448 return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap);
449}
450extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
451vfprintf (FILE *__restrict __stream,
452 const char *__restrict __fmt, __gnuc_va_list __ap)
453{
454 return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap);
455}
456extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt,
457 ...) __attribute__ ((__format__ (__printf__, 3, 4)));
458extern int __vdprintf_chk (int __fd, int __flag,
459 const char *__restrict __fmt, __gnuc_va_list __arg)
460 __attribute__ ((__format__ (__printf__, 3, 0)));
461extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
462dprintf (int __fd, const char *__restrict __fmt, ...)
463{
464 return __dprintf_chk (__fd, 2 - 1, __fmt,
465 __builtin_va_arg_pack ());
466}
467extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
468vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __ap)
469{
470 return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap);
471}
472extern int __asprintf_chk (char **__restrict __ptr, int __flag,
473 const char *__restrict __fmt, ...)
474 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__));
475extern int __vasprintf_chk (char **__restrict __ptr, int __flag,
476 const char *__restrict __fmt, __gnuc_va_list __arg)
477 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__));
478extern int __obstack_printf_chk (struct obstack *__restrict __obstack,
479 int __flag, const char *__restrict __format,
480 ...)
481 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 4)));
482extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack,
483 int __flag,
484 const char *__restrict __format,
485 __gnuc_va_list __args)
486 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 0)));
487extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
488__attribute__ ((__nothrow__ , __leaf__)) asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...)
489{
490 return __asprintf_chk (__ptr, 2 - 1, __fmt,
491 __builtin_va_arg_pack ());
492}
493extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
494__attribute__ ((__nothrow__ , __leaf__)) __asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...)
495{
496 return __asprintf_chk (__ptr, 2 - 1, __fmt,
497 __builtin_va_arg_pack ());
498}
499extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
500__attribute__ ((__nothrow__ , __leaf__)) obstack_printf (struct obstack *__restrict __obstack, const char *__restrict __fmt, ...)
501{
502 return __obstack_printf_chk (__obstack, 2 - 1, __fmt,
503 __builtin_va_arg_pack ());
504}
505extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
506__attribute__ ((__nothrow__ , __leaf__)) vasprintf (char **__restrict __ptr, const char *__restrict __fmt, __gnuc_va_list __ap)
507{
508 return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap);
509}
510extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
511__attribute__ ((__nothrow__ , __leaf__)) obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __fmt, __gnuc_va_list __ap)
512{
513 return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt,
514 __ap);
515}
516extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n,
517 FILE *__restrict __stream)
518 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 3)));
519extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets")
520 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
521extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk")
522 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer")));
523extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2))) char *
524fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
525{
526 size_t sz = __builtin_object_size (__s, 2 > 1);
527 if (((__builtin_constant_p (sz) && (sz) == (long unsigned int) -1) || (((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= ((sz)) / ((sizeof (char))))) && (((long unsigned int) (__n)) <= ((sz)) / ((sizeof (char)))))))
528 return __fgets_alias (__s, __n, __stream);
529 if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && !(((long unsigned int) (__n)) <= (sz) / (sizeof (char)))))
530 return __fgets_chk_warn (__s, sz, __n, __stream);
531 return __fgets_chk (__s, sz, __n, __stream);
532}
533extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen,
534 size_t __size, size_t __n,
535 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
536extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") __attribute__ ((__warn_unused_result__));
537extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk")
538 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer")));
539extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t
540fread (void *__restrict __ptr, size_t __size, size_t __n,
541 FILE *__restrict __stream)
542{
543 size_t sz = __builtin_object_size (__ptr, 0);
544 if (((__builtin_constant_p (sz) && (sz) == (long unsigned int) -1) || (((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= ((sz)) / ((__size)))) && (((long unsigned int) (__n)) <= ((sz)) / ((__size))))))
545 return __fread_alias (__ptr, __size, __n, __stream);
546 if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (__size))) && !(((long unsigned int) (__n)) <= (sz) / (__size))))
547 return __fread_chk_warn (__ptr, sz, __size, __n, __stream);
548 return __fread_chk (__ptr, sz, __size, __n, __stream);
549}
550extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size,
551 int __n, FILE *__restrict __stream)
552 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 3)));
553extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked")
554 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
555extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk")
556 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer")));
557extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2))) char *
558fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream)
559{
560 size_t sz = __builtin_object_size (__s, 2 > 1);
561 if (((__builtin_constant_p (sz) && (sz) == (long unsigned int) -1) || (((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= ((sz)) / ((sizeof (char))))) && (((long unsigned int) (__n)) <= ((sz)) / ((sizeof (char)))))))
562 return __fgets_unlocked_alias (__s, __n, __stream);
563 if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && !(((long unsigned int) (__n)) <= (sz) / (sizeof (char)))))
564 return __fgets_unlocked_chk_warn (__s, sz, __n, __stream);
565 return __fgets_unlocked_chk (__s, sz, __n, __stream);
566}
567extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen,
568 size_t __size, size_t __n,
569 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
570extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") __attribute__ ((__warn_unused_result__));
571extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk")
572 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer")));
573extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t
574fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
575 FILE *__restrict __stream)
576{
577 size_t sz = __builtin_object_size (__ptr, 0);
578 if (((__builtin_constant_p (sz) && (sz) == (long unsigned int) -1) || (((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= ((sz)) / ((__size)))) && (((long unsigned int) (__n)) <= ((sz)) / ((__size))))))
579 {
580 if (__builtin_constant_p (__size)
581 && __builtin_constant_p (__n)
582 && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2))
583 && __size * __n <= 8)
584 {
585 size_t __cnt = __size * __n;
586 char *__cptr = (char *) __ptr;
587 if (__cnt == 0)
588 return 0;
589 for (; __cnt > 0; --__cnt)
590 {
591 int __c = getc_unlocked (__stream);
592 if (__c == (-1))
593 break;
594 *__cptr++ = __c;
595 }
596 return (__cptr - (char *) __ptr) / __size;
597 }
598 return __fread_unlocked_alias (__ptr, __size, __n, __stream);
599 }
600 if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (__size))) && !(((long unsigned int) (__n)) <= (sz) / (__size))))
601 return __fread_unlocked_chk_warn (__ptr, sz, __size, __n, __stream);
602 return __fread_unlocked_chk (__ptr, sz, __size, __n, __stream);
603}
604
605
606typedef __u_char u_char;
607typedef __u_short u_short;
608typedef __u_int u_int;
609typedef __u_long u_long;
610typedef __quad_t quad_t;
611typedef __u_quad_t u_quad_t;
612typedef __fsid_t fsid_t;
613typedef __loff_t loff_t;
614typedef __ino_t ino_t;
615typedef __ino64_t ino64_t;
616typedef __dev_t dev_t;
617typedef __gid_t gid_t;
618typedef __mode_t mode_t;
619typedef __nlink_t nlink_t;
620typedef __uid_t uid_t;
621typedef __pid_t pid_t;
622typedef __id_t id_t;
623typedef __daddr_t daddr_t;
624typedef __caddr_t caddr_t;
625typedef __key_t key_t;
626typedef __clock_t clock_t;
627typedef __clockid_t clockid_t;
628typedef __time_t time_t;
629typedef __timer_t timer_t;
630typedef __useconds_t useconds_t;
631typedef __suseconds_t suseconds_t;
632typedef unsigned long int ulong;
633typedef unsigned short int ushort;
634typedef unsigned int uint;
635typedef __int8_t int8_t;
636typedef __int16_t int16_t;
637typedef __int32_t int32_t;
638typedef __int64_t int64_t;
639typedef __uint8_t u_int8_t;
640typedef __uint16_t u_int16_t;
641typedef __uint32_t u_int32_t;
642typedef __uint64_t u_int64_t;
643typedef int register_t __attribute__ ((__mode__ (__word__)));
644static __inline __uint16_t
645__bswap_16 (__uint16_t __bsx)
646{
647 return __builtin_bswap16 (__bsx);
648}
649static __inline __uint32_t
650__bswap_32 (__uint32_t __bsx)
651{
652 return __builtin_bswap32 (__bsx);
653}
654__extension__ static __inline __uint64_t
655__bswap_64 (__uint64_t __bsx)
656{
657 return __builtin_bswap64 (__bsx);
658}
659static __inline __uint16_t
660__uint16_identity (__uint16_t __x)
661{
662 return __x;
663}
664static __inline __uint32_t
665__uint32_identity (__uint32_t __x)
666{
667 return __x;
668}
669static __inline __uint64_t
670__uint64_identity (__uint64_t __x)
671{
672 return __x;
673}
674typedef struct
675{
676 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
677} __sigset_t;
678typedef __sigset_t sigset_t;
679struct timeval
680{
681 __time_t tv_sec;
682 __suseconds_t tv_usec;
683};
684struct timespec
685{
686 __time_t tv_sec;
687 __syscall_slong_t tv_nsec;
688};
689typedef long int __fd_mask;
690typedef struct
691 {
692 __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
693 } fd_set;
694typedef __fd_mask fd_mask;
695
696extern int select (int __nfds, fd_set *__restrict __readfds,
697 fd_set *__restrict __writefds,
698 fd_set *__restrict __exceptfds,
699 struct timeval *__restrict __timeout);
700extern int pselect (int __nfds, fd_set *__restrict __readfds,
701 fd_set *__restrict __writefds,
702 fd_set *__restrict __exceptfds,
703 const struct timespec *__restrict __timeout,
704 const __sigset_t *__restrict __sigmask);
705extern long int __fdelt_chk (long int __d);
706extern long int __fdelt_warn (long int __d)
707 __attribute__((__warning__ ("bit outside of fd_set selected")));
708
709typedef __blksize_t blksize_t;
710typedef __blkcnt_t blkcnt_t;
711typedef __fsblkcnt_t fsblkcnt_t;
712typedef __fsfilcnt_t fsfilcnt_t;
713typedef __blkcnt64_t blkcnt64_t;
714typedef __fsblkcnt64_t fsblkcnt64_t;
715typedef __fsfilcnt64_t fsfilcnt64_t;
716typedef union
717{
718 __extension__ unsigned long long int __value64;
719 struct
720 {
721 unsigned int __low;
722 unsigned int __high;
723 } __value32;
725typedef struct __pthread_internal_list
726{
727 struct __pthread_internal_list *__prev;
728 struct __pthread_internal_list *__next;
730typedef struct __pthread_internal_slist
731{
732 struct __pthread_internal_slist *__next;
735{
736 int __lock;
737 unsigned int __count;
738 int __owner;
739 unsigned int __nusers;
740 int __kind;
741 short __spins;
742 short __elision;
743 __pthread_list_t __list;
744};
746{
747 unsigned int __readers;
748 unsigned int __writers;
749 unsigned int __wrphase_futex;
750 unsigned int __writers_futex;
751 unsigned int __pad3;
752 unsigned int __pad4;
753 int __cur_writer;
754 int __shared;
755 signed char __rwelision;
756 unsigned char __pad1[7];
757 unsigned long int __pad2;
758 unsigned int __flags;
759};
760struct __pthread_cond_s
761{
763 __atomic_wide_counter __g1_start;
764 unsigned int __g_refs[2] ;
765 unsigned int __g_size[2];
766 unsigned int __g1_orig_size;
767 unsigned int __wrefs;
768 unsigned int __g_signals[2];
769};
770typedef unsigned int __tss_t;
771typedef unsigned long int __thrd_t;
772typedef struct
773{
774 int __data ;
776typedef unsigned long int pthread_t;
777typedef union
778{
779 char __size[4];
780 int __align;
782typedef union
783{
784 char __size[4];
785 int __align;
787typedef unsigned int pthread_key_t;
788typedef int pthread_once_t;
789union pthread_attr_t
790{
791 char __size[56];
792 long int __align;
793};
794typedef union pthread_attr_t pthread_attr_t;
795typedef union
796{
797 struct __pthread_mutex_s __data;
798 char __size[40];
799 long int __align;
801typedef union
802{
803 struct __pthread_cond_s __data;
804 char __size[48];
805 __extension__ long long int __align;
807typedef union
808{
809 struct __pthread_rwlock_arch_t __data;
810 char __size[56];
811 long int __align;
813typedef union
814{
815 char __size[8];
816 long int __align;
818typedef volatile int pthread_spinlock_t;
819typedef union
820{
821 char __size[32];
822 long int __align;
824typedef union
825{
826 char __size[4];
827 int __align;
829
830
831struct stat
832 {
833 __dev_t st_dev;
834 __ino_t st_ino;
835 __nlink_t st_nlink;
836 __mode_t st_mode;
837 __uid_t st_uid;
838 __gid_t st_gid;
839 int __pad0;
840 __dev_t st_rdev;
841 __off_t st_size;
842 __blksize_t st_blksize;
843 __blkcnt_t st_blocks;
844 struct timespec st_atim;
845 struct timespec st_mtim;
846 struct timespec st_ctim;
847 __syscall_slong_t __glibc_reserved[3];
848 };
849struct stat64
850 {
851 __dev_t st_dev;
852 __ino64_t st_ino;
853 __nlink_t st_nlink;
854 __mode_t st_mode;
855 __uid_t st_uid;
856 __gid_t st_gid;
857 int __pad0;
858 __dev_t st_rdev;
859 __off_t st_size;
860 __blksize_t st_blksize;
861 __blkcnt64_t st_blocks;
862 struct timespec st_atim;
863 struct timespec st_mtim;
864 struct timespec st_ctim;
865 __syscall_slong_t __glibc_reserved[3];
866 };
867extern int stat (const char *__restrict __file,
868 struct stat *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
869extern int fstat (int __fd, struct stat *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
870extern int stat64 (const char *__restrict __file,
871 struct stat64 *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
872extern int fstat64 (int __fd, struct stat64 *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
873extern int fstatat (int __fd, const char *__restrict __file,
874 struct stat *__restrict __buf, int __flag)
875 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
876extern int fstatat64 (int __fd, const char *__restrict __file,
877 struct stat64 *__restrict __buf, int __flag)
878 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
879extern int lstat (const char *__restrict __file,
880 struct stat *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
881extern int lstat64 (const char *__restrict __file,
882 struct stat64 *__restrict __buf)
883 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
884extern int chmod (const char *__file, __mode_t __mode)
885 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
886extern int lchmod (const char *__file, __mode_t __mode)
887 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
888extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__));
889extern int fchmodat (int __fd, const char *__file, __mode_t __mode,
890 int __flag)
891 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
892extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__ , __leaf__));
893extern __mode_t getumask (void) __attribute__ ((__nothrow__ , __leaf__));
894extern int mkdir (const char *__path, __mode_t __mode)
895 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
896extern int mkdirat (int __fd, const char *__path, __mode_t __mode)
897 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
898extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev)
899 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
900extern int mknodat (int __fd, const char *__path, __mode_t __mode,
901 __dev_t __dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
902extern int mkfifo (const char *__path, __mode_t __mode)
903 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
904extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)
905 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
906extern int utimensat (int __fd, const char *__path,
907 const struct timespec __times[2],
908 int __flags)
909 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
910extern int futimens (int __fd, const struct timespec __times[2]) __attribute__ ((__nothrow__ , __leaf__));
911typedef __signed__ char __s8;
912typedef unsigned char __u8;
913typedef __signed__ short __s16;
914typedef unsigned short __u16;
915typedef __signed__ int __s32;
916typedef unsigned int __u32;
917__extension__ typedef __signed__ long long __s64;
918__extension__ typedef unsigned long long __u64;
919typedef struct {
920 unsigned long fds_bits[1024 / (8 * sizeof(long))];
922typedef void (*__kernel_sighandler_t)(int);
923typedef int __kernel_key_t;
924typedef int __kernel_mqd_t;
925typedef unsigned short __kernel_old_uid_t;
926typedef unsigned short __kernel_old_gid_t;
927typedef unsigned long __kernel_old_dev_t;
928typedef long __kernel_long_t;
929typedef unsigned long __kernel_ulong_t;
930typedef __kernel_ulong_t __kernel_ino_t;
931typedef unsigned int __kernel_mode_t;
932typedef int __kernel_pid_t;
933typedef int __kernel_ipc_pid_t;
934typedef unsigned int __kernel_uid_t;
935typedef unsigned int __kernel_gid_t;
936typedef __kernel_long_t __kernel_suseconds_t;
937typedef int __kernel_daddr_t;
938typedef unsigned int __kernel_uid32_t;
939typedef unsigned int __kernel_gid32_t;
940typedef __kernel_ulong_t __kernel_size_t;
941typedef __kernel_long_t __kernel_ssize_t;
942typedef __kernel_long_t __kernel_ptrdiff_t;
943typedef struct {
944 int val[2];
946typedef __kernel_long_t __kernel_off_t;
947typedef long long __kernel_loff_t;
948typedef __kernel_long_t __kernel_old_time_t;
949typedef __kernel_long_t __kernel_time_t;
950typedef long long __kernel_time64_t;
951typedef __kernel_long_t __kernel_clock_t;
952typedef int __kernel_timer_t;
953typedef int __kernel_clockid_t;
954typedef char * __kernel_caddr_t;
955typedef unsigned short __kernel_uid16_t;
956typedef unsigned short __kernel_gid16_t;
957typedef __u16 __le16;
958typedef __u16 __be16;
959typedef __u32 __le32;
960typedef __u32 __be32;
961typedef __u64 __le64;
962typedef __u64 __be64;
963typedef __u16 __sum16;
964typedef __u32 __wsum;
965typedef unsigned __poll_t;
966struct statx_timestamp {
967 __s64 tv_sec;
968 __u32 tv_nsec;
969 __s32 __reserved;
970};
971struct statx {
972 __u32 stx_mask;
973 __u32 stx_blksize;
974 __u64 stx_attributes;
975 __u32 stx_nlink;
976 __u32 stx_uid;
977 __u32 stx_gid;
978 __u16 stx_mode;
979 __u16 __spare0[1];
980 __u64 stx_ino;
981 __u64 stx_size;
982 __u64 stx_blocks;
983 __u64 stx_attributes_mask;
984 struct statx_timestamp stx_atime;
985 struct statx_timestamp stx_btime;
986 struct statx_timestamp stx_ctime;
987 struct statx_timestamp stx_mtime;
988 __u32 stx_rdev_major;
989 __u32 stx_rdev_minor;
990 __u32 stx_dev_major;
991 __u32 stx_dev_minor;
992 __u64 stx_mnt_id;
993 __u64 __spare2;
994 __u64 __spare3[12];
995};
996
997int statx (int __dirfd, const char *__restrict __path, int __flags,
998 unsigned int __mask, struct statx *__restrict __buf)
999 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 5)));
1000
1001
1002typedef int wchar_t;
1003
1004typedef struct
1005 {
1006 int quot;
1007 int rem;
1008 } div_t;
1009typedef struct
1010 {
1011 long int quot;
1012 long int rem;
1013 } ldiv_t;
1014__extension__ typedef struct
1015 {
1016 long long int quot;
1017 long long int rem;
1018 } lldiv_t;
1019extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1020extern double atof (const char *__nptr)
1021 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1022extern int atoi (const char *__nptr)
1023 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1024extern long int atol (const char *__nptr)
1025 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1026__extension__ extern long long int atoll (const char *__nptr)
1027 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1028extern double strtod (const char *__restrict __nptr,
1029 char **__restrict __endptr)
1030 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1031extern float strtof (const char *__restrict __nptr,
1032 char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1033extern long double strtold (const char *__restrict __nptr,
1034 char **__restrict __endptr)
1035 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1036extern _Float32 strtof32 (const char *__restrict __nptr,
1037 char **__restrict __endptr)
1038 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1039extern _Float64 strtof64 (const char *__restrict __nptr,
1040 char **__restrict __endptr)
1041 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1042extern _Float128 strtof128 (const char *__restrict __nptr,
1043 char **__restrict __endptr)
1044 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1045extern _Float32x strtof32x (const char *__restrict __nptr,
1046 char **__restrict __endptr)
1047 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1048extern _Float64x strtof64x (const char *__restrict __nptr,
1049 char **__restrict __endptr)
1050 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1051extern long int strtol (const char *__restrict __nptr,
1052 char **__restrict __endptr, int __base)
1053 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1054extern unsigned long int strtoul (const char *__restrict __nptr,
1055 char **__restrict __endptr, int __base)
1056 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1057__extension__
1058extern long long int strtoq (const char *__restrict __nptr,
1059 char **__restrict __endptr, int __base)
1060 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1061__extension__
1062extern unsigned long long int strtouq (const char *__restrict __nptr,
1063 char **__restrict __endptr, int __base)
1064 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1065__extension__
1066extern long long int strtoll (const char *__restrict __nptr,
1067 char **__restrict __endptr, int __base)
1068 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1069__extension__
1070extern unsigned long long int strtoull (const char *__restrict __nptr,
1071 char **__restrict __endptr, int __base)
1072 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1073extern int strfromd (char *__dest, size_t __size, const char *__format,
1074 double __f)
1075 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1076extern int strfromf (char *__dest, size_t __size, const char *__format,
1077 float __f)
1078 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1079extern int strfroml (char *__dest, size_t __size, const char *__format,
1080 long double __f)
1081 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1082extern int strfromf32 (char *__dest, size_t __size, const char * __format,
1083 _Float32 __f)
1084 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1085extern int strfromf64 (char *__dest, size_t __size, const char * __format,
1086 _Float64 __f)
1087 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1088extern int strfromf128 (char *__dest, size_t __size, const char * __format,
1089 _Float128 __f)
1090 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1091extern int strfromf32x (char *__dest, size_t __size, const char * __format,
1092 _Float32x __f)
1093 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1094extern int strfromf64x (char *__dest, size_t __size, const char * __format,
1095 _Float64x __f)
1096 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1097struct __locale_struct
1098{
1099 struct __locale_data *__locales[13];
1100 const unsigned short int *__ctype_b;
1101 const int *__ctype_tolower;
1102 const int *__ctype_toupper;
1103 const char *__names[13];
1104};
1105typedef struct __locale_struct *__locale_t;
1106typedef __locale_t locale_t;
1107extern long int strtol_l (const char *__restrict __nptr,
1108 char **__restrict __endptr, int __base,
1109 locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
1110extern unsigned long int strtoul_l (const char *__restrict __nptr,
1111 char **__restrict __endptr,
1112 int __base, locale_t __loc)
1113 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
1114__extension__
1115extern long long int strtoll_l (const char *__restrict __nptr,
1116 char **__restrict __endptr, int __base,
1117 locale_t __loc)
1118 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
1119__extension__
1120extern unsigned long long int strtoull_l (const char *__restrict __nptr,
1121 char **__restrict __endptr,
1122 int __base, locale_t __loc)
1123 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
1124extern double strtod_l (const char *__restrict __nptr,
1125 char **__restrict __endptr, locale_t __loc)
1126 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1127extern float strtof_l (const char *__restrict __nptr,
1128 char **__restrict __endptr, locale_t __loc)
1129 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1130extern long double strtold_l (const char *__restrict __nptr,
1131 char **__restrict __endptr,
1132 locale_t __loc)
1133 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1134extern _Float32 strtof32_l (const char *__restrict __nptr,
1135 char **__restrict __endptr,
1136 locale_t __loc)
1137 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1138extern _Float64 strtof64_l (const char *__restrict __nptr,
1139 char **__restrict __endptr,
1140 locale_t __loc)
1141 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1142extern _Float128 strtof128_l (const char *__restrict __nptr,
1143 char **__restrict __endptr,
1144 locale_t __loc)
1145 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1146extern _Float32x strtof32x_l (const char *__restrict __nptr,
1147 char **__restrict __endptr,
1148 locale_t __loc)
1149 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1150extern _Float64x strtof64x_l (const char *__restrict __nptr,
1151 char **__restrict __endptr,
1152 locale_t __loc)
1153 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1154extern __inline __attribute__ ((__gnu_inline__)) int
1155__attribute__ ((__nothrow__ , __leaf__)) atoi (const char *__nptr)
1156{
1157 return (int) strtol (__nptr, (char **) ((void *)0), 10);
1158}
1159extern __inline __attribute__ ((__gnu_inline__)) long int
1160__attribute__ ((__nothrow__ , __leaf__)) atol (const char *__nptr)
1161{
1162 return strtol (__nptr, (char **) ((void *)0), 10);
1163}
1164__extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int
1165__attribute__ ((__nothrow__ , __leaf__)) atoll (const char *__nptr)
1166{
1167 return strtoll (__nptr, (char **) ((void *)0), 10);
1168}
1169extern char *l64a (long int __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1170extern long int a64l (const char *__s)
1171 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1172extern long int random (void) __attribute__ ((__nothrow__ , __leaf__));
1173extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
1174extern char *initstate (unsigned int __seed, char *__statebuf,
1175 size_t __statelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1176extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1177struct random_data
1178 {
1179 int32_t *fptr;
1180 int32_t *rptr;
1181 int32_t *state;
1182 int rand_type;
1183 int rand_deg;
1184 int rand_sep;
1185 int32_t *end_ptr;
1186 };
1187extern int random_r (struct random_data *__restrict __buf,
1188 int32_t *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1189extern int srandom_r (unsigned int __seed, struct random_data *__buf)
1190 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1191extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
1192 size_t __statelen,
1193 struct random_data *__restrict __buf)
1194 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
1195extern int setstate_r (char *__restrict __statebuf,
1196 struct random_data *__restrict __buf)
1197 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1198extern int rand (void) __attribute__ ((__nothrow__ , __leaf__));
1199extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
1200extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ , __leaf__));
1201extern double drand48 (void) __attribute__ ((__nothrow__ , __leaf__));
1202extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1203extern long int lrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
1204extern long int nrand48 (unsigned short int __xsubi[3])
1205 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1206extern long int mrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
1207extern long int jrand48 (unsigned short int __xsubi[3])
1208 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1209extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ , __leaf__));
1210extern unsigned short int *seed48 (unsigned short int __seed16v[3])
1211 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1212extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1213struct drand48_data
1214 {
1215 unsigned short int __x[3];
1216 unsigned short int __old_x[3];
1217 unsigned short int __c;
1218 unsigned short int __init;
1219 __extension__ unsigned long long int __a;
1220 };
1221extern int drand48_r (struct drand48_data *__restrict __buffer,
1222 double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1223extern int erand48_r (unsigned short int __xsubi[3],
1224 struct drand48_data *__restrict __buffer,
1225 double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1226extern int lrand48_r (struct drand48_data *__restrict __buffer,
1227 long int *__restrict __result)
1228 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1229extern int nrand48_r (unsigned short int __xsubi[3],
1230 struct drand48_data *__restrict __buffer,
1231 long int *__restrict __result)
1232 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1233extern int mrand48_r (struct drand48_data *__restrict __buffer,
1234 long int *__restrict __result)
1235 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1236extern int jrand48_r (unsigned short int __xsubi[3],
1237 struct drand48_data *__restrict __buffer,
1238 long int *__restrict __result)
1239 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1240extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
1241 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1242extern int seed48_r (unsigned short int __seed16v[3],
1243 struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1244extern int lcong48_r (unsigned short int __param[7],
1245 struct drand48_data *__buffer)
1246 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1247extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__))
1248 __attribute__ ((__alloc_size__ (1))) __attribute__ ((__warn_unused_result__));
1249extern void *calloc (size_t __nmemb, size_t __size)
1250 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (1, 2))) __attribute__ ((__warn_unused_result__));
1251extern void *realloc (void *__ptr, size_t __size)
1252 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__alloc_size__ (2)));
1253extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
1254extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
1255 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__))
1256 __attribute__ ((__alloc_size__ (2, 3)))
1257 __attribute__ ((__malloc__ (__builtin_free, 1)));
1258extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
1259 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__ (reallocarray, 1)));
1260
1261extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__));
1262
1263extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__))
1264 __attribute__ ((__alloc_size__ (1))) __attribute__ ((__warn_unused_result__));
1265extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
1266 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1267extern void *aligned_alloc (size_t __alignment, size_t __size)
1268 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_align__ (1)))
1269 __attribute__ ((__alloc_size__ (2))) __attribute__ ((__warn_unused_result__));
1270extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
1271extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1272extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1273extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
1274 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1275extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
1276extern void quick_exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
1277extern void _Exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
1278extern char *getenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1279extern char *secure_getenv (const char *__name)
1280 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1281extern int putenv (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1282extern int setenv (const char *__name, const char *__value, int __replace)
1283 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1284extern int unsetenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1285extern int clearenv (void) __attribute__ ((__nothrow__ , __leaf__));
1286extern char *mktemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1287extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1288extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1289extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1290extern int mkstemps64 (char *__template, int __suffixlen)
1291 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1292extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1293extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1294extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1295extern int mkostemps (char *__template, int __suffixlen, int __flags)
1296 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1297extern int mkostemps64 (char *__template, int __suffixlen, int __flags)
1298 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1299extern int system (const char *__command) __attribute__ ((__warn_unused_result__));
1300extern char *canonicalize_file_name (const char *__name)
1301 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__malloc__))
1302 __attribute__ ((__malloc__ (__builtin_free, 1))) __attribute__ ((__warn_unused_result__));
1303extern char *realpath (const char *__restrict __name,
1304 char *__restrict __resolved) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1305typedef int (*__compar_fn_t) (const void *, const void *);
1306typedef __compar_fn_t comparison_fn_t;
1307typedef int (*__compar_d_fn_t) (const void *, const void *, void *);
1308extern void *bsearch (const void *__key, const void *__base,
1309 size_t __nmemb, size_t __size, __compar_fn_t __compar)
1310 __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__));
1311extern __inline __attribute__ ((__gnu_inline__)) void *
1312bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
1313 __compar_fn_t __compar)
1314{
1315 size_t __l, __u, __idx;
1316 const void *__p;
1317 int __comparison;
1318 __l = 0;
1319 __u = __nmemb;
1320 while (__l < __u)
1321 {
1322 __idx = (__l + __u) / 2;
1323 __p = (const void *) (((const char *) __base) + (__idx * __size));
1324 __comparison = (*__compar) (__key, __p);
1325 if (__comparison < 0)
1326 __u = __idx;
1327 else if (__comparison > 0)
1328 __l = __idx + 1;
1329 else
1330 {
1331 return (void *) __p;
1332 }
1333 }
1334 return ((void *)0);
1335}
1336extern void qsort (void *__base, size_t __nmemb, size_t __size,
1337 __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
1338extern void qsort_r (void *__base, size_t __nmemb, size_t __size,
1339 __compar_d_fn_t __compar, void *__arg)
1340 __attribute__ ((__nonnull__ (1, 4)));
1341extern int abs (int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1342extern long int labs (long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1343__extension__ extern long long int llabs (long long int __x)
1344 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1345extern div_t div (int __numer, int __denom)
1346 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1347extern ldiv_t ldiv (long int __numer, long int __denom)
1348 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1349__extension__ extern lldiv_t lldiv (long long int __numer,
1350 long long int __denom)
1351 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1352extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
1353 int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
1354extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
1355 int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
1356extern char *gcvt (double __value, int __ndigit, char *__buf)
1357 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
1358extern char *qecvt (long double __value, int __ndigit,
1359 int *__restrict __decpt, int *__restrict __sign)
1360 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
1361extern char *qfcvt (long double __value, int __ndigit,
1362 int *__restrict __decpt, int *__restrict __sign)
1363 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
1364extern char *qgcvt (long double __value, int __ndigit, char *__buf)
1365 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
1366extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
1367 int *__restrict __sign, char *__restrict __buf,
1368 size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
1369extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
1370 int *__restrict __sign, char *__restrict __buf,
1371 size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
1372extern int qecvt_r (long double __value, int __ndigit,
1373 int *__restrict __decpt, int *__restrict __sign,
1374 char *__restrict __buf, size_t __len)
1375 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
1376extern int qfcvt_r (long double __value, int __ndigit,
1377 int *__restrict __decpt, int *__restrict __sign,
1378 char *__restrict __buf, size_t __len)
1379 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
1380extern int mblen (const char *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
1381extern int mbtowc (wchar_t *__restrict __pwc,
1382 const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
1383extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ , __leaf__));
1384extern size_t mbstowcs (wchar_t *__restrict __pwcs,
1385 const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__))
1386 __attribute__ ((__access__ (__read_only__, 2)));
1387extern size_t wcstombs (char *__restrict __s,
1388 const wchar_t *__restrict __pwcs, size_t __n)
1389 __attribute__ ((__nothrow__ , __leaf__))
1390 __attribute__ ((__access__ (__write_only__, 1, 3)))
1391 __attribute__ ((__access__ (__read_only__, 2)));
1392extern int rpmatch (const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1393extern int getsubopt (char **__restrict __optionp,
1394 char *const *__restrict __tokens,
1395 char **__restrict __valuep)
1396 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__));
1397extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__));
1398extern int grantpt (int __fd) __attribute__ ((__nothrow__ , __leaf__));
1399extern int unlockpt (int __fd) __attribute__ ((__nothrow__ , __leaf__));
1400extern char *ptsname (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1401extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
1402 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 2, 3)));
1403extern int getpt (void);
1404extern int getloadavg (double __loadavg[], int __nelem)
1405 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1406extern __inline __attribute__ ((__gnu_inline__)) double
1407__attribute__ ((__nothrow__ , __leaf__)) atof (const char *__nptr)
1408{
1409 return strtod (__nptr, (char **) ((void *)0));
1410}
1411extern char *__realpath_chk (const char *__restrict __name,
1412 char *__restrict __resolved,
1413 size_t __resolvedlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1414extern char *__realpath_alias (const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1415extern char *__realpath_chk_warn (const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__))
1416 __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer")));
1417extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
1418__attribute__ ((__nothrow__ , __leaf__)) realpath (const char *__restrict __name, char *__restrict __resolved)
1419{
1420 size_t sz = __builtin_object_size (__resolved, 2 > 1);
1421 if (sz == (size_t) -1)
1422 return __realpath_alias (__name, __resolved);
1423 return __realpath_chk (__name, __resolved, sz);
1424}
1425extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen,
1426 size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)))
1427 __attribute__ ((__access__ (__write_only__, 2, 3)));
1428extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__ , __leaf__))
1429 __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 2, 3)));
1430extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__ , __leaf__))
1431 __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf")));
1432extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
1433__attribute__ ((__nothrow__ , __leaf__)) ptsname_r (int __fd, char *__buf, size_t __buflen)
1434{
1435 return (((__builtin_constant_p (__builtin_object_size (__buf, 2 > 1)) && (__builtin_object_size (__buf, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char))))) && (((long unsigned int) (__buflen)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char)))))) ? __ptsname_r_alias (__fd, __buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)) : __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1))));
1436}
1437extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen)
1438 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1439extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1440extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) int
1441__attribute__ ((__nothrow__ , __leaf__)) wctomb (char *__s, wchar_t __wchar)
1442{
1443 if (__builtin_object_size (__s, 2 > 1) != (size_t) -1
1444 && 16 > __builtin_object_size (__s, 2 > 1))
1445 return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1));
1446 return __wctomb_alias (__s, __wchar);
1447}
1448extern size_t __mbstowcs_chk (wchar_t *__restrict __dst,
1449 const char *__restrict __src,
1450 size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__))
1451 __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
1452extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__ , __leaf__))
1453 __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
1454extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__ , __leaf__))
1455 __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)")));
1456extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
1457__attribute__ ((__nothrow__ , __leaf__)) mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len)
1458{
1459 return (((__builtin_constant_p (__builtin_object_size (__dst, 2 > 1)) && (__builtin_object_size (__dst, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= ((__builtin_object_size (__dst, 2 > 1))) / ((sizeof (wchar_t))))) && (((long unsigned int) (__len)) <= ((__builtin_object_size (__dst, 2 > 1))) / ((sizeof (wchar_t)))))) ? __mbstowcs_alias (__dst, __src, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t)))) ? __mbstowcs_chk_warn (__dst, __src, __len, (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t))) : __mbstowcs_chk (__dst, __src, __len, (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t)))));
1460}
1461extern size_t __wcstombs_chk (char *__restrict __dst,
1462 const wchar_t *__restrict __src,
1463 size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__))
1464 __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
1465extern size_t __wcstombs_alias (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__ , __leaf__))
1466 __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
1467extern size_t __wcstombs_chk_warn (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__ , __leaf__))
1468 __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len")));
1469extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
1470__attribute__ ((__nothrow__ , __leaf__)) wcstombs (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len)
1471{
1472 return (((__builtin_constant_p (__builtin_object_size (__dst, 2 > 1)) && (__builtin_object_size (__dst, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= ((__builtin_object_size (__dst, 2 > 1))) / ((sizeof (char))))) && (((long unsigned int) (__len)) <= ((__builtin_object_size (__dst, 2 > 1))) / ((sizeof (char)))))) ? __wcstombs_alias (__dst, __src, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (char)))) ? __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)) : __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1))));
1473}
1474
1475typedef long int ptrdiff_t;
1476
1477extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
1478 size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1479extern void *memmove (void *__dest, const void *__src, size_t __n)
1480 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1481extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
1482 int __c, size_t __n)
1483 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__access__ (__write_only__, 1, 4)));
1484extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1485extern int memcmp (const void *__s1, const void *__s2, size_t __n)
1486 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1487extern int __memcmpeq (const void *__s1, const void *__s2, size_t __n)
1488 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1489extern void *memchr (const void *__s, int __c, size_t __n)
1490 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1491extern void *rawmemchr (const void *__s, int __c)
1492 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1493extern void *memrchr (const void *__s, int __c, size_t __n)
1494 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)))
1495 __attribute__ ((__access__ (__read_only__, 1, 3)));
1496extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
1497 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1498extern char *strncpy (char *__restrict __dest,
1499 const char *__restrict __src, size_t __n)
1500 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1501extern char *strcat (char *__restrict __dest, const char *__restrict __src)
1502 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1503extern char *strncat (char *__restrict __dest, const char *__restrict __src,
1504 size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1505extern int strcmp (const char *__s1, const char *__s2)
1506 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1507extern int strncmp (const char *__s1, const char *__s2, size_t __n)
1508 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1509extern int strcoll (const char *__s1, const char *__s2)
1510 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1511extern size_t strxfrm (char *__restrict __dest,
1512 const char *__restrict __src, size_t __n)
1513 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 1, 3)));
1514extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l)
1515 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
1516extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
1517 locale_t __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)))
1518 __attribute__ ((__access__ (__write_only__, 1, 3)));
1519extern char *strdup (const char *__s)
1520 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
1521extern char *strndup (const char *__string, size_t __n)
1522 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
1523extern char *strchr (const char *__s, int __c)
1524 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1525extern char *strrchr (const char *__s, int __c)
1526 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1527extern char *strchrnul (const char *__s, int __c)
1528 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1529extern size_t strcspn (const char *__s, const char *__reject)
1530 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1531extern size_t strspn (const char *__s, const char *__accept)
1532 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1533extern char *strpbrk (const char *__s, const char *__accept)
1534 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1535extern char *strstr (const char *__haystack, const char *__needle)
1536 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1537extern char *strtok (char *__restrict __s, const char *__restrict __delim)
1538 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1539extern char *__strtok_r (char *__restrict __s,
1540 const char *__restrict __delim,
1541 char **__restrict __save_ptr)
1542 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
1543extern char *strtok_r (char *__restrict __s, const char *__restrict __delim,
1544 char **__restrict __save_ptr)
1545 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
1546extern char *strcasestr (const char *__haystack, const char *__needle)
1547 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1548extern void *memmem (const void *__haystack, size_t __haystacklen,
1549 const void *__needle, size_t __needlelen)
1550 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)))
1551 __attribute__ ((__access__ (__read_only__, 1, 2)))
1552 __attribute__ ((__access__ (__read_only__, 3, 4)));
1553extern void *__mempcpy (void *__restrict __dest,
1554 const void *__restrict __src, size_t __n)
1555 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1556extern void *mempcpy (void *__restrict __dest,
1557 const void *__restrict __src, size_t __n)
1558 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1559extern size_t strlen (const char *__s)
1560 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1561extern size_t strnlen (const char *__string, size_t __maxlen)
1562 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1563extern char *strerror (int __errnum) __attribute__ ((__nothrow__ , __leaf__));
1564extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
1565 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
1566extern const char *strerrordesc_np (int __err) __attribute__ ((__nothrow__ , __leaf__));
1567extern const char *strerrorname_np (int __err) __attribute__ ((__nothrow__ , __leaf__));
1568extern char *strerror_l (int __errnum, locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
1569
1570extern int bcmp (const void *__s1, const void *__s2, size_t __n)
1571 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1572extern void bcopy (const void *__src, void *__dest, size_t __n)
1573 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1574extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1575extern char *index (const char *__s, int __c)
1576 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1577extern char *rindex (const char *__s, int __c)
1578 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1579extern int ffs (int __i) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1580extern int ffsl (long int __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1581__extension__ extern int ffsll (long long int __ll)
1582 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1583extern int strcasecmp (const char *__s1, const char *__s2)
1584 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1585extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)
1586 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1587extern int strcasecmp_l (const char *__s1, const char *__s2, locale_t __loc)
1588 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
1589extern int strncasecmp_l (const char *__s1, const char *__s2,
1590 size_t __n, locale_t __loc)
1591 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));
1592
1593extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
1594__attribute__ ((__nothrow__ , __leaf__)) bcopy (const void *__src, void *__dest, size_t __len)
1595{
1596 (void) __builtin___memmove_chk (__dest, __src, __len,
1597 __builtin_object_size (__dest, 0));
1598}
1599extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
1600__attribute__ ((__nothrow__ , __leaf__)) bzero (void *__dest, size_t __len)
1601{
1602 (void) __builtin___memset_chk (__dest, '\0', __len,
1603 __builtin_object_size (__dest, 0));
1604}
1605extern void explicit_bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)))
1606 __attribute__ ((__access__ (__write_only__, 1, 2)));
1607extern char *strsep (char **__restrict __stringp,
1608 const char *__restrict __delim)
1609 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1610extern char *strsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__));
1611extern const char *sigabbrev_np (int __sig) __attribute__ ((__nothrow__ , __leaf__));
1612extern const char *sigdescr_np (int __sig) __attribute__ ((__nothrow__ , __leaf__));
1613extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)
1614 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1615extern char *stpcpy (char *__restrict __dest, const char *__restrict __src)
1616 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1617extern char *__stpncpy (char *__restrict __dest,
1618 const char *__restrict __src, size_t __n)
1619 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1620extern char *stpncpy (char *__restrict __dest,
1621 const char *__restrict __src, size_t __n)
1622 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1623extern int strverscmp (const char *__s1, const char *__s2)
1624 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1625extern char *strfry (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1626extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)))
1627 __attribute__ ((__access__ (__read_write__, 1, 2)));
1628extern char *basename (const char *__filename) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1629extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
1630__attribute__ ((__nothrow__ , __leaf__)) memcpy (void *__restrict __dest, const void *__restrict __src, size_t __len)
1631{
1632 return __builtin___memcpy_chk (__dest, __src, __len,
1633 __builtin_object_size (__dest, 0));
1634}
1635extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
1636__attribute__ ((__nothrow__ , __leaf__)) memmove (void *__dest, const void *__src, size_t __len)
1637{
1638 return __builtin___memmove_chk (__dest, __src, __len,
1639 __builtin_object_size (__dest, 0));
1640}
1641extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
1642__attribute__ ((__nothrow__ , __leaf__)) mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __len)
1643{
1644 return __builtin___mempcpy_chk (__dest, __src, __len,
1645 __builtin_object_size (__dest, 0));
1646}
1647extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
1648__attribute__ ((__nothrow__ , __leaf__)) memset (void *__dest, int __ch, size_t __len)
1649{
1650 return __builtin___memset_chk (__dest, __ch, __len,
1651 __builtin_object_size (__dest, 0));
1652}
1653void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
1654 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2)));
1655extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
1656__attribute__ ((__nothrow__ , __leaf__)) explicit_bzero (void *__dest, size_t __len)
1657{
1658 __explicit_bzero_chk (__dest, __len, __builtin_object_size (__dest, 0));
1659}
1660extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1661__attribute__ ((__nothrow__ , __leaf__)) strcpy (char *__restrict __dest, const char *__restrict __src)
1662{
1663 return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
1664}
1665extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1666__attribute__ ((__nothrow__ , __leaf__)) stpcpy (char *__restrict __dest, const char *__restrict __src)
1667{
1668 return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
1669}
1670extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1671__attribute__ ((__nothrow__ , __leaf__)) strncpy (char *__restrict __dest, const char *__restrict __src, size_t __len)
1672{
1673 return __builtin___strncpy_chk (__dest, __src, __len,
1674 __builtin_object_size (__dest, 2 > 1));
1675}
1676extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1677__attribute__ ((__nothrow__ , __leaf__)) stpncpy (char *__dest, const char *__src, size_t __n)
1678{
1679 return __builtin___stpncpy_chk (__dest, __src, __n,
1680 __builtin_object_size (__dest, 2 > 1));
1681}
1682extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1683__attribute__ ((__nothrow__ , __leaf__)) strcat (char *__restrict __dest, const char *__restrict __src)
1684{
1685 return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
1686}
1687extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1688__attribute__ ((__nothrow__ , __leaf__)) strncat (char *__restrict __dest, const char *__restrict __src, size_t __len)
1689{
1690 return __builtin___strncat_chk (__dest, __src, __len,
1691 __builtin_object_size (__dest, 2 > 1));
1692}
1693
1694typedef __uint8_t uint8_t;
1695typedef __uint16_t uint16_t;
1696typedef __uint32_t uint32_t;
1697typedef __uint64_t uint64_t;
1698typedef __int_least8_t int_least8_t;
1699typedef __int_least16_t int_least16_t;
1700typedef __int_least32_t int_least32_t;
1701typedef __int_least64_t int_least64_t;
1702typedef __uint_least8_t uint_least8_t;
1703typedef __uint_least16_t uint_least16_t;
1704typedef __uint_least32_t uint_least32_t;
1705typedef __uint_least64_t uint_least64_t;
1706typedef signed char int_fast8_t;
1707typedef long int int_fast16_t;
1708typedef long int int_fast32_t;
1709typedef long int int_fast64_t;
1710typedef unsigned char uint_fast8_t;
1711typedef unsigned long int uint_fast16_t;
1712typedef unsigned long int uint_fast32_t;
1713typedef unsigned long int uint_fast64_t;
1714typedef long int intptr_t;
1715typedef unsigned long int uintptr_t;
1716typedef __intmax_t intmax_t;
1717typedef __uintmax_t uintmax_t;
1718typedef int __gwchar_t;
1719
1720typedef struct
1721 {
1722 long int quot;
1723 long int rem;
1724 } imaxdiv_t;
1725extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1726extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
1727 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1728extern intmax_t strtoimax (const char *__restrict __nptr,
1729 char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__));
1730extern uintmax_t strtoumax (const char *__restrict __nptr,
1731 char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__));
1732extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr,
1733 __gwchar_t **__restrict __endptr, int __base)
1734 __attribute__ ((__nothrow__ , __leaf__));
1735extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr,
1736 __gwchar_t ** __restrict __endptr, int __base)
1737 __attribute__ ((__nothrow__ , __leaf__));
1738
1739
1740typedef __socklen_t socklen_t;
1741extern int access (const char *__name, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1742extern int euidaccess (const char *__name, int __type)
1743 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1744extern int eaccess (const char *__name, int __type)
1745 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1746extern int execveat (int __fd, const char *__path, char *const __argv[],
1747 char *const __envp[], int __flags)
1748 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
1749extern int faccessat (int __fd, const char *__file, int __type, int __flag)
1750 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
1751extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__ , __leaf__));
1752extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
1753 __attribute__ ((__nothrow__ , __leaf__));
1754extern int close (int __fd);
1755extern void closefrom (int __lowfd) __attribute__ ((__nothrow__ , __leaf__));
1756extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__))
1757 __attribute__ ((__access__ (__write_only__, 2, 3)));
1758extern ssize_t write (int __fd, const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__))
1759 __attribute__ ((__access__ (__read_only__, 2, 3)));
1760extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
1761 __off_t __offset) __attribute__ ((__warn_unused_result__))
1762 __attribute__ ((__access__ (__write_only__, 2, 3)));
1763extern ssize_t pwrite (int __fd, const void *__buf, size_t __n,
1764 __off_t __offset) __attribute__ ((__warn_unused_result__))
1765 __attribute__ ((__access__ (__read_only__, 2, 3)));
1766extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
1767 __off64_t __offset) __attribute__ ((__warn_unused_result__))
1768 __attribute__ ((__access__ (__write_only__, 2, 3)));
1769extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n,
1770 __off64_t __offset) __attribute__ ((__warn_unused_result__))
1771 __attribute__ ((__access__ (__read_only__, 2, 3)));
1772extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1773extern int pipe2 (int __pipedes[2], int __flags) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1774extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__ , __leaf__));
1775extern unsigned int sleep (unsigned int __seconds);
1776extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
1777 __attribute__ ((__nothrow__ , __leaf__));
1778extern int usleep (__useconds_t __useconds);
1779extern int pause (void);
1780extern int chown (const char *__file, __uid_t __owner, __gid_t __group)
1781 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1782extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1783extern int lchown (const char *__file, __uid_t __owner, __gid_t __group)
1784 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1785extern int fchownat (int __fd, const char *__file, __uid_t __owner,
1786 __gid_t __group, int __flag)
1787 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
1788extern int chdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1789extern int fchdir (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1790extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1791extern char *get_current_dir_name (void) __attribute__ ((__nothrow__ , __leaf__));
1792extern char *getwd (char *__buf)
1793 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__))
1794 __attribute__ ((__access__ (__write_only__, 1)));
1795extern int dup (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1796extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__ , __leaf__));
1797extern int dup3 (int __fd, int __fd2, int __flags) __attribute__ ((__nothrow__ , __leaf__));
1798extern char **__environ;
1799extern char **environ;
1800extern int execve (const char *__path, char *const __argv[],
1801 char *const __envp[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1802extern int fexecve (int __fd, char *const __argv[], char *const __envp[])
1803 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1804extern int execv (const char *__path, char *const __argv[])
1805 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1806extern int execle (const char *__path, const char *__arg, ...)
1807 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1808extern int execl (const char *__path, const char *__arg, ...)
1809 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1810extern int execvp (const char *__file, char *const __argv[])
1811 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1812extern int execlp (const char *__file, const char *__arg, ...)
1813 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1814extern int execvpe (const char *__file, char *const __argv[],
1815 char *const __envp[])
1816 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1817extern int nice (int __inc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1818extern void _exit (int __status) __attribute__ ((__noreturn__));
1819enum
1820 {
1821 _PC_LINK_MAX,
1822 _PC_MAX_CANON,
1823 _PC_MAX_INPUT,
1824 _PC_NAME_MAX,
1825 _PC_PATH_MAX,
1826 _PC_PIPE_BUF,
1827 _PC_CHOWN_RESTRICTED,
1828 _PC_NO_TRUNC,
1829 _PC_VDISABLE,
1830 _PC_SYNC_IO,
1831 _PC_ASYNC_IO,
1832 _PC_PRIO_IO,
1833 _PC_SOCK_MAXBUF,
1834 _PC_FILESIZEBITS,
1835 _PC_REC_INCR_XFER_SIZE,
1836 _PC_REC_MAX_XFER_SIZE,
1837 _PC_REC_MIN_XFER_SIZE,
1838 _PC_REC_XFER_ALIGN,
1839 _PC_ALLOC_SIZE_MIN,
1840 _PC_SYMLINK_MAX,
1841 _PC_2_SYMLINKS
1842 };
1843enum
1844 {
1845 _SC_ARG_MAX,
1846 _SC_CHILD_MAX,
1847 _SC_CLK_TCK,
1848 _SC_NGROUPS_MAX,
1849 _SC_OPEN_MAX,
1850 _SC_STREAM_MAX,
1851 _SC_TZNAME_MAX,
1852 _SC_JOB_CONTROL,
1853 _SC_SAVED_IDS,
1854 _SC_REALTIME_SIGNALS,
1855 _SC_PRIORITY_SCHEDULING,
1856 _SC_TIMERS,
1857 _SC_ASYNCHRONOUS_IO,
1858 _SC_PRIORITIZED_IO,
1859 _SC_SYNCHRONIZED_IO,
1860 _SC_FSYNC,
1861 _SC_MAPPED_FILES,
1862 _SC_MEMLOCK,
1863 _SC_MEMLOCK_RANGE,
1864 _SC_MEMORY_PROTECTION,
1865 _SC_MESSAGE_PASSING,
1866 _SC_SEMAPHORES,
1867 _SC_SHARED_MEMORY_OBJECTS,
1868 _SC_AIO_LISTIO_MAX,
1869 _SC_AIO_MAX,
1870 _SC_AIO_PRIO_DELTA_MAX,
1871 _SC_DELAYTIMER_MAX,
1872 _SC_MQ_OPEN_MAX,
1873 _SC_MQ_PRIO_MAX,
1874 _SC_VERSION,
1875 _SC_PAGESIZE,
1876 _SC_RTSIG_MAX,
1877 _SC_SEM_NSEMS_MAX,
1878 _SC_SEM_VALUE_MAX,
1879 _SC_SIGQUEUE_MAX,
1880 _SC_TIMER_MAX,
1881 _SC_BC_BASE_MAX,
1882 _SC_BC_DIM_MAX,
1883 _SC_BC_SCALE_MAX,
1884 _SC_BC_STRING_MAX,
1885 _SC_COLL_WEIGHTS_MAX,
1886 _SC_EQUIV_CLASS_MAX,
1887 _SC_EXPR_NEST_MAX,
1888 _SC_LINE_MAX,
1889 _SC_RE_DUP_MAX,
1890 _SC_CHARCLASS_NAME_MAX,
1891 _SC_2_VERSION,
1892 _SC_2_C_BIND,
1893 _SC_2_C_DEV,
1894 _SC_2_FORT_DEV,
1895 _SC_2_FORT_RUN,
1896 _SC_2_SW_DEV,
1897 _SC_2_LOCALEDEF,
1898 _SC_PII,
1899 _SC_PII_XTI,
1900 _SC_PII_SOCKET,
1901 _SC_PII_INTERNET,
1902 _SC_PII_OSI,
1903 _SC_POLL,
1904 _SC_SELECT,
1905 _SC_UIO_MAXIOV,
1906 _SC_IOV_MAX = _SC_UIO_MAXIOV,
1907 _SC_PII_INTERNET_STREAM,
1908 _SC_PII_INTERNET_DGRAM,
1909 _SC_PII_OSI_COTS,
1910 _SC_PII_OSI_CLTS,
1911 _SC_PII_OSI_M,
1912 _SC_T_IOV_MAX,
1913 _SC_THREADS,
1914 _SC_THREAD_SAFE_FUNCTIONS,
1915 _SC_GETGR_R_SIZE_MAX,
1916 _SC_GETPW_R_SIZE_MAX,
1917 _SC_LOGIN_NAME_MAX,
1918 _SC_TTY_NAME_MAX,
1919 _SC_THREAD_DESTRUCTOR_ITERATIONS,
1920 _SC_THREAD_KEYS_MAX,
1921 _SC_THREAD_STACK_MIN,
1922 _SC_THREAD_THREADS_MAX,
1923 _SC_THREAD_ATTR_STACKADDR,
1924 _SC_THREAD_ATTR_STACKSIZE,
1925 _SC_THREAD_PRIORITY_SCHEDULING,
1926 _SC_THREAD_PRIO_INHERIT,
1927 _SC_THREAD_PRIO_PROTECT,
1928 _SC_THREAD_PROCESS_SHARED,
1929 _SC_NPROCESSORS_CONF,
1930 _SC_NPROCESSORS_ONLN,
1931 _SC_PHYS_PAGES,
1932 _SC_AVPHYS_PAGES,
1933 _SC_ATEXIT_MAX,
1934 _SC_PASS_MAX,
1935 _SC_XOPEN_VERSION,
1936 _SC_XOPEN_XCU_VERSION,
1937 _SC_XOPEN_UNIX,
1938 _SC_XOPEN_CRYPT,
1939 _SC_XOPEN_ENH_I18N,
1940 _SC_XOPEN_SHM,
1941 _SC_2_CHAR_TERM,
1942 _SC_2_C_VERSION,
1943 _SC_2_UPE,
1944 _SC_XOPEN_XPG2,
1945 _SC_XOPEN_XPG3,
1946 _SC_XOPEN_XPG4,
1947 _SC_CHAR_BIT,
1948 _SC_CHAR_MAX,
1949 _SC_CHAR_MIN,
1950 _SC_INT_MAX,
1951 _SC_INT_MIN,
1952 _SC_LONG_BIT,
1953 _SC_WORD_BIT,
1954 _SC_MB_LEN_MAX,
1955 _SC_NZERO,
1956 _SC_SSIZE_MAX,
1957 _SC_SCHAR_MAX,
1958 _SC_SCHAR_MIN,
1959 _SC_SHRT_MAX,
1960 _SC_SHRT_MIN,
1961 _SC_UCHAR_MAX,
1962 _SC_UINT_MAX,
1963 _SC_ULONG_MAX,
1964 _SC_USHRT_MAX,
1965 _SC_NL_ARGMAX,
1966 _SC_NL_LANGMAX,
1967 _SC_NL_MSGMAX,
1968 _SC_NL_NMAX,
1969 _SC_NL_SETMAX,
1970 _SC_NL_TEXTMAX,
1971 _SC_XBS5_ILP32_OFF32,
1972 _SC_XBS5_ILP32_OFFBIG,
1973 _SC_XBS5_LP64_OFF64,
1974 _SC_XBS5_LPBIG_OFFBIG,
1975 _SC_XOPEN_LEGACY,
1976 _SC_XOPEN_REALTIME,
1977 _SC_XOPEN_REALTIME_THREADS,
1978 _SC_ADVISORY_INFO,
1979 _SC_BARRIERS,
1980 _SC_BASE,
1981 _SC_C_LANG_SUPPORT,
1982 _SC_C_LANG_SUPPORT_R,
1983 _SC_CLOCK_SELECTION,
1984 _SC_CPUTIME,
1985 _SC_THREAD_CPUTIME,
1986 _SC_DEVICE_IO,
1987 _SC_DEVICE_SPECIFIC,
1988 _SC_DEVICE_SPECIFIC_R,
1989 _SC_FD_MGMT,
1990 _SC_FIFO,
1991 _SC_PIPE,
1992 _SC_FILE_ATTRIBUTES,
1993 _SC_FILE_LOCKING,
1994 _SC_FILE_SYSTEM,
1995 _SC_MONOTONIC_CLOCK,
1996 _SC_MULTI_PROCESS,
1997 _SC_SINGLE_PROCESS,
1998 _SC_NETWORKING,
1999 _SC_READER_WRITER_LOCKS,
2000 _SC_SPIN_LOCKS,
2001 _SC_REGEXP,
2002 _SC_REGEX_VERSION,
2003 _SC_SHELL,
2004 _SC_SIGNALS,
2005 _SC_SPAWN,
2006 _SC_SPORADIC_SERVER,
2007 _SC_THREAD_SPORADIC_SERVER,
2008 _SC_SYSTEM_DATABASE,
2009 _SC_SYSTEM_DATABASE_R,
2010 _SC_TIMEOUTS,
2011 _SC_TYPED_MEMORY_OBJECTS,
2012 _SC_USER_GROUPS,
2013 _SC_USER_GROUPS_R,
2014 _SC_2_PBS,
2015 _SC_2_PBS_ACCOUNTING,
2016 _SC_2_PBS_LOCATE,
2017 _SC_2_PBS_MESSAGE,
2018 _SC_2_PBS_TRACK,
2019 _SC_SYMLOOP_MAX,
2020 _SC_STREAMS,
2021 _SC_2_PBS_CHECKPOINT,
2022 _SC_V6_ILP32_OFF32,
2023 _SC_V6_ILP32_OFFBIG,
2024 _SC_V6_LP64_OFF64,
2025 _SC_V6_LPBIG_OFFBIG,
2026 _SC_HOST_NAME_MAX,
2027 _SC_TRACE,
2028 _SC_TRACE_EVENT_FILTER,
2029 _SC_TRACE_INHERIT,
2030 _SC_TRACE_LOG,
2031 _SC_LEVEL1_ICACHE_SIZE,
2032 _SC_LEVEL1_ICACHE_ASSOC,
2033 _SC_LEVEL1_ICACHE_LINESIZE,
2034 _SC_LEVEL1_DCACHE_SIZE,
2035 _SC_LEVEL1_DCACHE_ASSOC,
2036 _SC_LEVEL1_DCACHE_LINESIZE,
2037 _SC_LEVEL2_CACHE_SIZE,
2038 _SC_LEVEL2_CACHE_ASSOC,
2039 _SC_LEVEL2_CACHE_LINESIZE,
2040 _SC_LEVEL3_CACHE_SIZE,
2041 _SC_LEVEL3_CACHE_ASSOC,
2042 _SC_LEVEL3_CACHE_LINESIZE,
2043 _SC_LEVEL4_CACHE_SIZE,
2044 _SC_LEVEL4_CACHE_ASSOC,
2045 _SC_LEVEL4_CACHE_LINESIZE,
2046 _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
2047 _SC_RAW_SOCKETS,
2048 _SC_V7_ILP32_OFF32,
2049 _SC_V7_ILP32_OFFBIG,
2050 _SC_V7_LP64_OFF64,
2051 _SC_V7_LPBIG_OFFBIG,
2052 _SC_SS_REPL_MAX,
2053 _SC_TRACE_EVENT_NAME_MAX,
2054 _SC_TRACE_NAME_MAX,
2055 _SC_TRACE_SYS_MAX,
2056 _SC_TRACE_USER_EVENT_MAX,
2057 _SC_XOPEN_STREAMS,
2058 _SC_THREAD_ROBUST_PRIO_INHERIT,
2059 _SC_THREAD_ROBUST_PRIO_PROTECT,
2060 _SC_MINSIGSTKSZ,
2061 _SC_SIGSTKSZ
2062 };
2063enum
2064 {
2065 _CS_PATH,
2066 _CS_V6_WIDTH_RESTRICTED_ENVS,
2067 _CS_GNU_LIBC_VERSION,
2068 _CS_GNU_LIBPTHREAD_VERSION,
2069 _CS_V5_WIDTH_RESTRICTED_ENVS,
2070 _CS_V7_WIDTH_RESTRICTED_ENVS,
2071 _CS_LFS_CFLAGS = 1000,
2072 _CS_LFS_LDFLAGS,
2073 _CS_LFS_LIBS,
2074 _CS_LFS_LINTFLAGS,
2075 _CS_LFS64_CFLAGS,
2076 _CS_LFS64_LDFLAGS,
2077 _CS_LFS64_LIBS,
2078 _CS_LFS64_LINTFLAGS,
2079 _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
2080 _CS_XBS5_ILP32_OFF32_LDFLAGS,
2081 _CS_XBS5_ILP32_OFF32_LIBS,
2082 _CS_XBS5_ILP32_OFF32_LINTFLAGS,
2083 _CS_XBS5_ILP32_OFFBIG_CFLAGS,
2084 _CS_XBS5_ILP32_OFFBIG_LDFLAGS,
2085 _CS_XBS5_ILP32_OFFBIG_LIBS,
2086 _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
2087 _CS_XBS5_LP64_OFF64_CFLAGS,
2088 _CS_XBS5_LP64_OFF64_LDFLAGS,
2089 _CS_XBS5_LP64_OFF64_LIBS,
2090 _CS_XBS5_LP64_OFF64_LINTFLAGS,
2091 _CS_XBS5_LPBIG_OFFBIG_CFLAGS,
2092 _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,
2093 _CS_XBS5_LPBIG_OFFBIG_LIBS,
2094 _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,
2095 _CS_POSIX_V6_ILP32_OFF32_CFLAGS,
2096 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
2097 _CS_POSIX_V6_ILP32_OFF32_LIBS,
2098 _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,
2099 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
2100 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
2101 _CS_POSIX_V6_ILP32_OFFBIG_LIBS,
2102 _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,
2103 _CS_POSIX_V6_LP64_OFF64_CFLAGS,
2104 _CS_POSIX_V6_LP64_OFF64_LDFLAGS,
2105 _CS_POSIX_V6_LP64_OFF64_LIBS,
2106 _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,
2107 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
2108 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
2109 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
2110 _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS,
2111 _CS_POSIX_V7_ILP32_OFF32_CFLAGS,
2112 _CS_POSIX_V7_ILP32_OFF32_LDFLAGS,
2113 _CS_POSIX_V7_ILP32_OFF32_LIBS,
2114 _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS,
2115 _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS,
2116 _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS,
2117 _CS_POSIX_V7_ILP32_OFFBIG_LIBS,
2118 _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS,
2119 _CS_POSIX_V7_LP64_OFF64_CFLAGS,
2120 _CS_POSIX_V7_LP64_OFF64_LDFLAGS,
2121 _CS_POSIX_V7_LP64_OFF64_LIBS,
2122 _CS_POSIX_V7_LP64_OFF64_LINTFLAGS,
2123 _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS,
2124 _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS,
2125 _CS_POSIX_V7_LPBIG_OFFBIG_LIBS,
2126 _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS,
2127 _CS_V6_ENV,
2128 _CS_V7_ENV
2129 };
2130extern long int pathconf (const char *__path, int __name)
2131 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2132extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__ , __leaf__));
2133extern long int sysconf (int __name) __attribute__ ((__nothrow__ , __leaf__));
2134extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__))
2135 __attribute__ ((__access__ (__write_only__, 2, 3)));
2136extern __pid_t getpid (void) __attribute__ ((__nothrow__ , __leaf__));
2137extern __pid_t getppid (void) __attribute__ ((__nothrow__ , __leaf__));
2138extern __pid_t getpgrp (void) __attribute__ ((__nothrow__ , __leaf__));
2139extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
2140extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
2141extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__ , __leaf__));
2142extern int setpgrp (void) __attribute__ ((__nothrow__ , __leaf__));
2143extern __pid_t setsid (void) __attribute__ ((__nothrow__ , __leaf__));
2144extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
2145extern __uid_t getuid (void) __attribute__ ((__nothrow__ , __leaf__));
2146extern __uid_t geteuid (void) __attribute__ ((__nothrow__ , __leaf__));
2147extern __gid_t getgid (void) __attribute__ ((__nothrow__ , __leaf__));
2148extern __gid_t getegid (void) __attribute__ ((__nothrow__ , __leaf__));
2149extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__))
2150 __attribute__ ((__access__ (__write_only__, 2, 1)));
2151extern int group_member (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__));
2152extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2153extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2154extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2155extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2156extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2157extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2158extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid)
2159 __attribute__ ((__nothrow__ , __leaf__));
2160extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid)
2161 __attribute__ ((__nothrow__ , __leaf__));
2162extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid)
2163 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2164extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
2165 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2166extern __pid_t fork (void) __attribute__ ((__nothrow__));
2167extern __pid_t vfork (void) __attribute__ ((__nothrow__ , __leaf__));
2168extern __pid_t _Fork (void) __attribute__ ((__nothrow__ , __leaf__));
2169extern char *ttyname (int __fd) __attribute__ ((__nothrow__ , __leaf__));
2170extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
2171 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__))
2172 __attribute__ ((__access__ (__write_only__, 2, 3)));
2173extern int isatty (int __fd) __attribute__ ((__nothrow__ , __leaf__));
2174extern int ttyslot (void) __attribute__ ((__nothrow__ , __leaf__));
2175extern int link (const char *__from, const char *__to)
2176 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
2177extern int linkat (int __fromfd, const char *__from, int __tofd,
2178 const char *__to, int __flags)
2179 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__));
2180extern int symlink (const char *__from, const char *__to)
2181 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
2182extern ssize_t readlink (const char *__restrict __path,
2183 char *__restrict __buf, size_t __len)
2184 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__))
2185 __attribute__ ((__access__ (__write_only__, 2, 3)));
2186extern int symlinkat (const char *__from, int __tofd,
2187 const char *__to) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__));
2188extern ssize_t readlinkat (int __fd, const char *__restrict __path,
2189 char *__restrict __buf, size_t __len)
2190 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__))
2191 __attribute__ ((__access__ (__write_only__, 3, 4)));
2192extern int unlink (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2193extern int unlinkat (int __fd, const char *__name, int __flag)
2194 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2195extern int rmdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2196extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__ , __leaf__));
2197extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__ , __leaf__));
2198extern char *getlogin (void);
2199extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)))
2200 __attribute__ ((__access__ (__write_only__, 1, 2)));
2201extern int setlogin (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2202
2203extern char *optarg;
2204extern int optind;
2205extern int opterr;
2206extern int optopt;
2207extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
2208 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
2209
2210
2211
2212extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)))
2213 __attribute__ ((__access__ (__write_only__, 1, 2)));
2214extern int sethostname (const char *__name, size_t __len)
2215 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 1, 2)));
2216extern int sethostid (long int __id) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2217extern int getdomainname (char *__name, size_t __len)
2218 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__))
2219 __attribute__ ((__access__ (__write_only__, 1, 2)));
2220extern int setdomainname (const char *__name, size_t __len)
2221 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 1, 2)));
2222extern int vhangup (void) __attribute__ ((__nothrow__ , __leaf__));
2223extern int revoke (const char *__file) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2224extern int profil (unsigned short int *__sample_buffer, size_t __size,
2225 size_t __offset, unsigned int __scale)
2226 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2227extern int acct (const char *__name) __attribute__ ((__nothrow__ , __leaf__));
2228extern char *getusershell (void) __attribute__ ((__nothrow__ , __leaf__));
2229extern void endusershell (void) __attribute__ ((__nothrow__ , __leaf__));
2230extern void setusershell (void) __attribute__ ((__nothrow__ , __leaf__));
2231extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2232extern int chroot (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2233extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1)));
2234extern int fsync (int __fd);
2235extern int syncfs (int __fd) __attribute__ ((__nothrow__ , __leaf__));
2236extern long int gethostid (void);
2237extern void sync (void) __attribute__ ((__nothrow__ , __leaf__));
2238extern int getpagesize (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2239extern int getdtablesize (void) __attribute__ ((__nothrow__ , __leaf__));
2240extern int truncate (const char *__file, __off_t __length)
2241 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2242extern int truncate64 (const char *__file, __off64_t __length)
2243 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2244extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2245extern int ftruncate64 (int __fd, __off64_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2246extern int brk (void *__addr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2247extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__ , __leaf__));
2248extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__ , __leaf__));
2249extern int lockf (int __fd, int __cmd, __off_t __len) __attribute__ ((__warn_unused_result__));
2250extern int lockf64 (int __fd, int __cmd, __off64_t __len) __attribute__ ((__warn_unused_result__));
2251ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
2252 int __outfd, __off64_t *__poutoff,
2253 size_t __length, unsigned int __flags);
2254extern int fdatasync (int __fildes);
2255extern char *crypt (const char *__key, const char *__salt)
2256 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2257extern void swab (const void *__restrict __from, void *__restrict __to,
2258 ssize_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)))
2259 __attribute__ ((__access__ (__read_only__, 1, 3)))
2260 __attribute__ ((__access__ (__write_only__, 2, 3)));
2261int getentropy (void *__buffer, size_t __length) __attribute__ ((__warn_unused_result__))
2262 __attribute__ ((__access__ (__write_only__, 1, 2)));
2263extern int close_range (unsigned int __fd, unsigned int __max_fd,
2264 int __flags) __attribute__ ((__nothrow__ , __leaf__));
2265extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes,
2266 size_t __buflen)
2267 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2268extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read")
2269 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2270extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk")
2271 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer")));
2272extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
2273read (int __fd, void *__buf, size_t __nbytes)
2274{
2275 return (((__builtin_constant_p (__builtin_object_size (__buf, 0)) && (__builtin_object_size (__buf, 0)) == (long unsigned int) -1) || (((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= ((__builtin_object_size (__buf, 0))) / ((sizeof (char))))) && (((long unsigned int) (__nbytes)) <= ((__builtin_object_size (__buf, 0))) / ((sizeof (char)))))) ? __read_alias (__fd, __buf, __nbytes) : ((((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) && !(((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) ? __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)) : __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0))));
2276}
2277extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes,
2278 __off_t __offset, size_t __bufsize)
2279 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2280extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes,
2281 __off64_t __offset, size_t __bufsize)
2282 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2283extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread")
2284 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2285extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64")
2286 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2287extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk")
2288 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer")));
2289extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk")
2290 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer")));
2291extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
2292pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset)
2293{
2294 return (((__builtin_constant_p (__builtin_object_size (__buf, 0)) && (__builtin_object_size (__buf, 0)) == (long unsigned int) -1) || (((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= ((__builtin_object_size (__buf, 0))) / ((sizeof (char))))) && (((long unsigned int) (__nbytes)) <= ((__builtin_object_size (__buf, 0))) / ((sizeof (char)))))) ? __pread_alias (__fd, __buf, __nbytes, __offset) : ((((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) && !(((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) ? __pread_chk_warn (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)) : __pread_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0))));
2295}
2296extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
2297pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
2298{
2299 return (((__builtin_constant_p (__builtin_object_size (__buf, 0)) && (__builtin_object_size (__buf, 0)) == (long unsigned int) -1) || (((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= ((__builtin_object_size (__buf, 0))) / ((sizeof (char))))) && (((long unsigned int) (__nbytes)) <= ((__builtin_object_size (__buf, 0))) / ((sizeof (char)))))) ? __pread64_alias (__fd, __buf, __nbytes, __offset) : ((((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) && !(((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) ? __pread64_chk_warn (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)) : __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0))));
2300}
2301extern ssize_t __readlink_chk (const char *__restrict __path,
2302 char *__restrict __buf, size_t __len,
2303 size_t __buflen)
2304 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2305extern ssize_t __readlink_alias (const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlink") __attribute__ ((__nothrow__ , __leaf__))
2306 __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2307extern ssize_t __readlink_chk_warn (const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlink_chk") __attribute__ ((__nothrow__ , __leaf__))
2308 __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer")));
2309extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t
2310__attribute__ ((__nothrow__ , __leaf__)) readlink (const char *__restrict __path, char *__restrict __buf, size_t __len)
2311{
2312 return (((__builtin_constant_p (__builtin_object_size (__buf, 2 > 1)) && (__builtin_object_size (__buf, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char))))) && (((long unsigned int) (__len)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char)))))) ? __readlink_alias (__path, __buf, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)) : __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1))));
2313}
2314extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path,
2315 char *__restrict __buf, size_t __len,
2316 size_t __buflen)
2317 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 3, 4)));
2318extern ssize_t __readlinkat_alias (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlinkat") __attribute__ ((__nothrow__ , __leaf__))
2319 __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 3, 4)));
2320extern ssize_t __readlinkat_chk_warn (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlinkat_chk") __attribute__ ((__nothrow__ , __leaf__))
2321 __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer")));
2322extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t
2323__attribute__ ((__nothrow__ , __leaf__)) readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len)
2324{
2325 return (((__builtin_constant_p (__builtin_object_size (__buf, 2 > 1)) && (__builtin_object_size (__buf, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char))))) && (((long unsigned int) (__len)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char)))))) ? __readlinkat_alias (__fd, __path, __buf, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __readlinkat_chk_warn (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1)) : __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1))));
2326}
2327extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen)
2328 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2329extern char *__getcwd_alias (char *__buf, size_t __size) __asm__ ("" "getcwd") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2330extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) __asm__ ("" "__getcwd_chk") __attribute__ ((__nothrow__ , __leaf__))
2331 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer")));
2332extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
2333__attribute__ ((__nothrow__ , __leaf__)) getcwd (char *__buf, size_t __size)
2334{
2335 return (((__builtin_constant_p (__builtin_object_size (__buf, 2 > 1)) && (__builtin_object_size (__buf, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char))))) && (((long unsigned int) (__size)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char)))))) ? __getcwd_alias (__buf, __size) : ((((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__size)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1)) : __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1))));
2336}
2337extern char *__getwd_chk (char *__buf, size_t buflen)
2338 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
2339extern char *__getwd_warn (char *__buf) __asm__ ("" "getwd") __attribute__ ((__nothrow__ , __leaf__))
2340 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size")));
2341extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char *
2342__attribute__ ((__nothrow__ , __leaf__)) getwd (char *__buf)
2343{
2344 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2345 return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1));
2346 return __getwd_warn (__buf);
2347}
2348extern size_t __confstr_chk (int __name, char *__buf, size_t __len,
2349 size_t __buflen) __attribute__ ((__nothrow__ , __leaf__))
2350 __attribute__ ((__access__ (__write_only__, 2, 3)));
2351extern size_t __confstr_alias (int __name, char *__buf, size_t __len) __asm__ ("" "confstr") __attribute__ ((__nothrow__ , __leaf__))
2352 __attribute__ ((__access__ (__write_only__, 2, 3)));
2353extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) __asm__ ("" "__confstr_chk") __attribute__ ((__nothrow__ , __leaf__))
2354 __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer")));
2355extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
2356__attribute__ ((__nothrow__ , __leaf__)) confstr (int __name, char *__buf, size_t __len)
2357{
2358 return (((__builtin_constant_p (__builtin_object_size (__buf, 2 > 1)) && (__builtin_object_size (__buf, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char))))) && (((long unsigned int) (__len)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char)))))) ? __confstr_alias (__name, __buf, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)) : __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1))));
2359}
2360extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen)
2361 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 1)));
2362extern int __getgroups_alias (int __size, __gid_t __list[]) __asm__ ("" "getgroups") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 1)));
2363extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) __asm__ ("" "__getgroups_chk") __attribute__ ((__nothrow__ , __leaf__))
2364 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer")));
2365extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
2366__attribute__ ((__nothrow__ , __leaf__)) getgroups (int __size, __gid_t __list[])
2367{
2368 return (((__builtin_constant_p (__builtin_object_size (__list, 2 > 1)) && (__builtin_object_size (__list, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= ((__builtin_object_size (__list, 2 > 1))) / ((sizeof (__gid_t))))) && (((long unsigned int) (__size)) <= ((__builtin_object_size (__list, 2 > 1))) / ((sizeof (__gid_t)))))) ? __getgroups_alias (__size, __list) : ((((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= (__builtin_object_size (__list, 2 > 1)) / (sizeof (__gid_t)))) && !(((long unsigned int) (__size)) <= (__builtin_object_size (__list, 2 > 1)) / (sizeof (__gid_t)))) ? __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1)) : __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1))));
2369}
2370extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen,
2371 size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)))
2372 __attribute__ ((__access__ (__write_only__, 2, 3)));
2373extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ttyname_r") __attribute__ ((__nothrow__ , __leaf__))
2374 __attribute__ ((__nonnull__ (2)));
2375extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ttyname_r_chk") __attribute__ ((__nothrow__ , __leaf__))
2376 __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer")));
2377extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
2378__attribute__ ((__nothrow__ , __leaf__)) ttyname_r (int __fd, char *__buf, size_t __buflen)
2379{
2380 return (((__builtin_constant_p (__builtin_object_size (__buf, 2 > 1)) && (__builtin_object_size (__buf, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char))))) && (((long unsigned int) (__buflen)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char)))))) ? __ttyname_r_alias (__fd, __buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)) : __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1))));
2381}
2382extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal)
2383 __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2)));
2384extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r") __attribute__ ((__nonnull__ (1)));
2385extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk")
2386 __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer")));
2387extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
2388getlogin_r (char *__buf, size_t __buflen)
2389{
2390 return (((__builtin_constant_p (__builtin_object_size (__buf, 2 > 1)) && (__builtin_object_size (__buf, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char))))) && (((long unsigned int) (__buflen)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char)))))) ? __getlogin_r_alias (__buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)) : __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1))));
2391}
2392extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal)
2393 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2)));
2394extern int __gethostname_alias (char *__buf, size_t __buflen) __asm__ ("" "gethostname") __attribute__ ((__nothrow__ , __leaf__))
2395 __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2)));
2396extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__gethostname_chk") __attribute__ ((__nothrow__ , __leaf__))
2397 __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer")));
2398extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
2399__attribute__ ((__nothrow__ , __leaf__)) gethostname (char *__buf, size_t __buflen)
2400{
2401 return (((__builtin_constant_p (__builtin_object_size (__buf, 2 > 1)) && (__builtin_object_size (__buf, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char))))) && (((long unsigned int) (__buflen)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char)))))) ? __gethostname_alias (__buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)) : __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1))));
2402}
2403extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal)
2404 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
2405extern int __getdomainname_alias (char *__buf, size_t __buflen) __asm__ ("" "getdomainname") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)))
2406 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
2407extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getdomainname_chk") __attribute__ ((__nothrow__ , __leaf__))
2408 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer")));
2409extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
2410__attribute__ ((__nothrow__ , __leaf__)) getdomainname (char *__buf, size_t __buflen)
2411{
2412 return (((__builtin_constant_p (__builtin_object_size (__buf, 2 > 1)) && (__builtin_object_size (__buf, 2 > 1)) == (long unsigned int) -1) || (((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char))))) && (((long unsigned int) (__buflen)) <= ((__builtin_object_size (__buf, 2 > 1))) / ((sizeof (char)))))) ? __getdomainname_alias (__buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)) : __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1))));
2413}
2414extern __pid_t gettid (void) __attribute__ ((__nothrow__ , __leaf__));
2415
2416
2417
2418[[nodiscard]]
2419__attribute__((__malloc__))
2420__attribute__((__returns_nonnull__))
2421__attribute__((__alloc_size__ (1)))
2422void *ruby_xmalloc(size_t size)
2423
2424;
2425[[nodiscard]]
2426__attribute__((__malloc__))
2427__attribute__((__returns_nonnull__))
2428__attribute__((__alloc_size__ (1,2)))
2429void *ruby_xmalloc2(size_t nelems, size_t elemsiz)
2430
2431;
2432[[nodiscard]]
2433__attribute__((__malloc__))
2434__attribute__((__returns_nonnull__))
2435__attribute__((__alloc_size__ (1,2)))
2436void *ruby_xcalloc(size_t nelems, size_t elemsiz)
2437
2438;
2439[[nodiscard]]
2440__attribute__((__returns_nonnull__))
2441__attribute__((__alloc_size__ (2)))
2442void *ruby_xrealloc(void *ptr, size_t newsiz)
2443
2444;
2445[[nodiscard]]
2446__attribute__((__returns_nonnull__))
2447__attribute__((__alloc_size__ (2,3)))
2448void *ruby_xrealloc2(void *ptr, size_t newelems, size_t newsiz)
2449
2450;
2451void ruby_xfree(void *ptr)
2452
2453;
2454
2455
2456#define RBIMPL_ATTR_COLD_H
2457#define RBIMPL_ATTR_COLD() __attribute__((__cold__))
2458
2459
2460__attribute__((__noreturn__))
2461__attribute__((__cold__))
2462void rb_assert_failure(const char *file, int line, const char *name, const char *expr);
2463
2464
2465#define COLDFUNC RBIMPL_ATTR_COLD()
2466
2467typedef float float_t;
2468typedef double double_t;
2469enum
2470 {
2471 FP_INT_UPWARD =
2472 0,
2473 FP_INT_DOWNWARD =
2474 1,
2475 FP_INT_TOWARDZERO =
2476 2,
2477 FP_INT_TONEARESTFROMZERO =
2478 3,
2479 FP_INT_TONEAREST =
2480 4,
2481 };
2482extern int __fpclassify (double __value) __attribute__ ((__nothrow__ , __leaf__))
2483 __attribute__ ((__const__));
2484extern int __signbit (double __value) __attribute__ ((__nothrow__ , __leaf__))
2485 __attribute__ ((__const__));
2486extern int __isinf (double __value) __attribute__ ((__nothrow__ , __leaf__))
2487 __attribute__ ((__const__));
2488extern int __finite (double __value) __attribute__ ((__nothrow__ , __leaf__))
2489 __attribute__ ((__const__));
2490extern int __isnan (double __value) __attribute__ ((__nothrow__ , __leaf__))
2491 __attribute__ ((__const__));
2492extern int __iseqsig (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2493extern int __issignaling (double __value) __attribute__ ((__nothrow__ , __leaf__))
2494 __attribute__ ((__const__));
2495 extern double acos (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __acos (double __x) __attribute__ ((__nothrow__ , __leaf__));
2496 extern double asin (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __asin (double __x) __attribute__ ((__nothrow__ , __leaf__));
2497 extern double atan (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atan (double __x) __attribute__ ((__nothrow__ , __leaf__));
2498 extern double atan2 (double __y, double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atan2 (double __y, double __x) __attribute__ ((__nothrow__ , __leaf__));
2499 extern double cos (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cos (double __x) __attribute__ ((__nothrow__ , __leaf__));
2500 extern double sin (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sin (double __x) __attribute__ ((__nothrow__ , __leaf__));
2501 extern double tan (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __tan (double __x) __attribute__ ((__nothrow__ , __leaf__));
2502 extern double cosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cosh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2503 extern double sinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sinh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2504 extern double tanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __tanh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2505 extern void sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__ , __leaf__));
2506 extern double acosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __acosh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2507 extern double asinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __asinh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2508 extern double atanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atanh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2509 extern double exp (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp (double __x) __attribute__ ((__nothrow__ , __leaf__));
2510extern double frexp (double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern double __frexp (double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
2511extern double ldexp (double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern double __ldexp (double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
2512 extern double log (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log (double __x) __attribute__ ((__nothrow__ , __leaf__));
2513 extern double log10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log10 (double __x) __attribute__ ((__nothrow__ , __leaf__));
2514extern double modf (double __x, double *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern double __modf (double __x, double *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2515 extern double exp10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp10 (double __x) __attribute__ ((__nothrow__ , __leaf__));
2516 extern double expm1 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __expm1 (double __x) __attribute__ ((__nothrow__ , __leaf__));
2517 extern double log1p (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log1p (double __x) __attribute__ ((__nothrow__ , __leaf__));
2518extern double logb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __logb (double __x) __attribute__ ((__nothrow__ , __leaf__));
2519 extern double exp2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp2 (double __x) __attribute__ ((__nothrow__ , __leaf__));
2520 extern double log2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log2 (double __x) __attribute__ ((__nothrow__ , __leaf__));
2521 extern double pow (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __pow (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2522extern double sqrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sqrt (double __x) __attribute__ ((__nothrow__ , __leaf__));
2523 extern double hypot (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __hypot (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2524 extern double cbrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cbrt (double __x) __attribute__ ((__nothrow__ , __leaf__));
2525extern double ceil (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __ceil (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2526extern double fabs (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2527extern double floor (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __floor (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2528extern double fmod (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __fmod (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2529extern int isinf (double __value) __attribute__ ((__nothrow__ , __leaf__))
2530 __attribute__ ((__const__));
2531extern int finite (double __value) __attribute__ ((__nothrow__ , __leaf__))
2532 __attribute__ ((__const__));
2533extern double drem (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __drem (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2534extern double significand (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __significand (double __x) __attribute__ ((__nothrow__ , __leaf__));
2535extern double copysign (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2536extern double nan (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern double __nan (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
2537extern int isnan (double __value) __attribute__ ((__nothrow__ , __leaf__))
2538 __attribute__ ((__const__));
2539extern double j0 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __j0 (double) __attribute__ ((__nothrow__ , __leaf__));
2540extern double j1 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __j1 (double) __attribute__ ((__nothrow__ , __leaf__));
2541extern double jn (int, double) __attribute__ ((__nothrow__ , __leaf__)); extern double __jn (int, double) __attribute__ ((__nothrow__ , __leaf__));
2542extern double y0 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __y0 (double) __attribute__ ((__nothrow__ , __leaf__));
2543extern double y1 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __y1 (double) __attribute__ ((__nothrow__ , __leaf__));
2544extern double yn (int, double) __attribute__ ((__nothrow__ , __leaf__)); extern double __yn (int, double) __attribute__ ((__nothrow__ , __leaf__));
2545 extern double erf (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __erf (double) __attribute__ ((__nothrow__ , __leaf__));
2546 extern double erfc (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __erfc (double) __attribute__ ((__nothrow__ , __leaf__));
2547extern double lgamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __lgamma (double) __attribute__ ((__nothrow__ , __leaf__));
2548extern double tgamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __tgamma (double) __attribute__ ((__nothrow__ , __leaf__));
2549extern double gamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __gamma (double) __attribute__ ((__nothrow__ , __leaf__));
2550extern double lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern double __lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
2551extern double rint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __rint (double __x) __attribute__ ((__nothrow__ , __leaf__));
2552extern double nextafter (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __nextafter (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2553extern double nexttoward (double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __nexttoward (double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2554extern double nextdown (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __nextdown (double __x) __attribute__ ((__nothrow__ , __leaf__));
2555extern double nextup (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __nextup (double __x) __attribute__ ((__nothrow__ , __leaf__));
2556extern double remainder (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __remainder (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2557extern double scalbn (double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalbn (double __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
2558extern int ilogb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogb (double __x) __attribute__ ((__nothrow__ , __leaf__));
2559extern long int llogb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogb (double __x) __attribute__ ((__nothrow__ , __leaf__));
2560extern double scalbln (double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalbln (double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
2561extern double nearbyint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __nearbyint (double __x) __attribute__ ((__nothrow__ , __leaf__));
2562extern double round (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __round (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2563extern double trunc (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __trunc (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2564extern double remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern double __remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
2565extern long int lrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrint (double __x) __attribute__ ((__nothrow__ , __leaf__));
2566__extension__
2567extern long long int llrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrint (double __x) __attribute__ ((__nothrow__ , __leaf__));
2568extern long int lround (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lround (double __x) __attribute__ ((__nothrow__ , __leaf__));
2569__extension__
2570extern long long int llround (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llround (double __x) __attribute__ ((__nothrow__ , __leaf__));
2571extern double fdim (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __fdim (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2572extern double fmax (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmax (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2573extern double fmin (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmin (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2574extern double fma (double __x, double __y, double __z) __attribute__ ((__nothrow__ , __leaf__)); extern double __fma (double __x, double __y, double __z) __attribute__ ((__nothrow__ , __leaf__));
2575extern double roundeven (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __roundeven (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2576extern __intmax_t fromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2577extern __uintmax_t ufromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2578extern __intmax_t fromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2579extern __uintmax_t ufromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2580extern int canonicalize (double *__cx, const double *__x) __attribute__ ((__nothrow__ , __leaf__));
2581extern double fmaxmag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmaxmag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2582extern double fminmag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fminmag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2583extern double fmaximum (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmaximum (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2584extern double fminimum (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fminimum (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2585extern double fmaximum_num (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmaximum_num (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2586extern double fminimum_num (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fminimum_num (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2587extern double fmaximum_mag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmaximum_mag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2588extern double fminimum_mag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fminimum_mag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2589extern double fmaximum_mag_num (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmaximum_mag_num (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2590extern double fminimum_mag_num (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fminimum_mag_num (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2591extern int totalorder (const double *__x, const double *__y) __attribute__ ((__nothrow__ , __leaf__))
2592 __attribute__ ((__pure__));
2593extern int totalordermag (const double *__x, const double *__y) __attribute__ ((__nothrow__ , __leaf__))
2594 __attribute__ ((__pure__));
2595extern double getpayload (const double *__x) __attribute__ ((__nothrow__ , __leaf__)); extern double __getpayload (const double *__x) __attribute__ ((__nothrow__ , __leaf__));
2596extern int setpayload (double *__x, double __payload) __attribute__ ((__nothrow__ , __leaf__));
2597extern int setpayloadsig (double *__x, double __payload) __attribute__ ((__nothrow__ , __leaf__));
2598extern double scalb (double __x, double __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalb (double __x, double __n) __attribute__ ((__nothrow__ , __leaf__));
2599extern int __fpclassifyf (float __value) __attribute__ ((__nothrow__ , __leaf__))
2600 __attribute__ ((__const__));
2601extern int __signbitf (float __value) __attribute__ ((__nothrow__ , __leaf__))
2602 __attribute__ ((__const__));
2603extern int __isinff (float __value) __attribute__ ((__nothrow__ , __leaf__))
2604 __attribute__ ((__const__));
2605extern int __finitef (float __value) __attribute__ ((__nothrow__ , __leaf__))
2606 __attribute__ ((__const__));
2607extern int __isnanf (float __value) __attribute__ ((__nothrow__ , __leaf__))
2608 __attribute__ ((__const__));
2609extern int __iseqsigf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2610extern int __issignalingf (float __value) __attribute__ ((__nothrow__ , __leaf__))
2611 __attribute__ ((__const__));
2612 extern float acosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __acosf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2613 extern float asinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __asinf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2614 extern float atanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atanf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2615 extern float atan2f (float __y, float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atan2f (float __y, float __x) __attribute__ ((__nothrow__ , __leaf__));
2616 extern float cosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __cosf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2617 extern float sinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sinf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2618 extern float tanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __tanf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2619 extern float coshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __coshf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2620 extern float sinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sinhf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2621 extern float tanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __tanhf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2622 extern void sincosf (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__ , __leaf__));
2623 extern float acoshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __acoshf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2624 extern float asinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __asinhf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2625 extern float atanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atanhf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2626 extern float expf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __expf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2627extern float frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern float __frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
2628extern float ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern float __ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
2629 extern float logf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __logf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2630 extern float log10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log10f (float __x) __attribute__ ((__nothrow__ , __leaf__));
2631extern float modff (float __x, float *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern float __modff (float __x, float *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2632 extern float exp10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __exp10f (float __x) __attribute__ ((__nothrow__ , __leaf__));
2633 extern float expm1f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __expm1f (float __x) __attribute__ ((__nothrow__ , __leaf__));
2634 extern float log1pf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log1pf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2635extern float logbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __logbf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2636 extern float exp2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __exp2f (float __x) __attribute__ ((__nothrow__ , __leaf__));
2637 extern float log2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log2f (float __x) __attribute__ ((__nothrow__ , __leaf__));
2638 extern float powf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __powf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2639extern float sqrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sqrtf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2640 extern float hypotf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __hypotf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2641 extern float cbrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __cbrtf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2642extern float ceilf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __ceilf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2643extern float fabsf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2644extern float floorf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __floorf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2645extern float fmodf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __fmodf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2646extern int isinff (float __value) __attribute__ ((__nothrow__ , __leaf__))
2647 __attribute__ ((__const__));
2648extern int finitef (float __value) __attribute__ ((__nothrow__ , __leaf__))
2649 __attribute__ ((__const__));
2650extern float dremf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __dremf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2651extern float significandf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __significandf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2652extern float copysignf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2653extern float nanf (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern float __nanf (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
2654extern int isnanf (float __value) __attribute__ ((__nothrow__ , __leaf__))
2655 __attribute__ ((__const__));
2656extern float j0f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __j0f (float) __attribute__ ((__nothrow__ , __leaf__));
2657extern float j1f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __j1f (float) __attribute__ ((__nothrow__ , __leaf__));
2658extern float jnf (int, float) __attribute__ ((__nothrow__ , __leaf__)); extern float __jnf (int, float) __attribute__ ((__nothrow__ , __leaf__));
2659extern float y0f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __y0f (float) __attribute__ ((__nothrow__ , __leaf__));
2660extern float y1f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __y1f (float) __attribute__ ((__nothrow__ , __leaf__));
2661extern float ynf (int, float) __attribute__ ((__nothrow__ , __leaf__)); extern float __ynf (int, float) __attribute__ ((__nothrow__ , __leaf__));
2662 extern float erff (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __erff (float) __attribute__ ((__nothrow__ , __leaf__));
2663 extern float erfcf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __erfcf (float) __attribute__ ((__nothrow__ , __leaf__));
2664extern float lgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __lgammaf (float) __attribute__ ((__nothrow__ , __leaf__));
2665extern float tgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __tgammaf (float) __attribute__ ((__nothrow__ , __leaf__));
2666extern float gammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __gammaf (float) __attribute__ ((__nothrow__ , __leaf__));
2667extern float lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern float __lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
2668extern float rintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __rintf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2669extern float nextafterf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __nextafterf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2670extern float nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2671extern float nextdownf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __nextdownf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2672extern float nextupf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __nextupf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2673extern float remainderf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __remainderf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2674extern float scalbnf (float __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalbnf (float __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
2675extern int ilogbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2676extern long int llogbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2677extern float scalblnf (float __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalblnf (float __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
2678extern float nearbyintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __nearbyintf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2679extern float roundf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __roundf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2680extern float truncf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __truncf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2681extern float remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern float __remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
2682extern long int lrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2683__extension__
2684extern long long int llrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2685extern long int lroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2686__extension__
2687extern long long int llroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2688extern float fdimf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __fdimf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2689extern float fmaxf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fmaxf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2690extern float fminf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fminf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2691extern float fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__ , __leaf__)); extern float __fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__ , __leaf__));
2692extern float roundevenf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __roundevenf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2693extern __intmax_t fromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2694extern __uintmax_t ufromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2695extern __intmax_t fromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2696extern __uintmax_t ufromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2697extern int canonicalizef (float *__cx, const float *__x) __attribute__ ((__nothrow__ , __leaf__));
2698extern float fmaxmagf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fmaxmagf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2699extern float fminmagf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fminmagf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2700extern float fmaximumf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fmaximumf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2701extern float fminimumf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fminimumf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2702extern float fmaximum_numf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fmaximum_numf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2703extern float fminimum_numf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fminimum_numf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2704extern float fmaximum_magf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fmaximum_magf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2705extern float fminimum_magf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fminimum_magf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2706extern float fmaximum_mag_numf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fmaximum_mag_numf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2707extern float fminimum_mag_numf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fminimum_mag_numf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2708extern int totalorderf (const float *__x, const float *__y) __attribute__ ((__nothrow__ , __leaf__))
2709 __attribute__ ((__pure__));
2710extern int totalordermagf (const float *__x, const float *__y) __attribute__ ((__nothrow__ , __leaf__))
2711 __attribute__ ((__pure__));
2712extern float getpayloadf (const float *__x) __attribute__ ((__nothrow__ , __leaf__)); extern float __getpayloadf (const float *__x) __attribute__ ((__nothrow__ , __leaf__));
2713extern int setpayloadf (float *__x, float __payload) __attribute__ ((__nothrow__ , __leaf__));
2714extern int setpayloadsigf (float *__x, float __payload) __attribute__ ((__nothrow__ , __leaf__));
2715extern float scalbf (float __x, float __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalbf (float __x, float __n) __attribute__ ((__nothrow__ , __leaf__));
2716extern int __fpclassifyl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2717 __attribute__ ((__const__));
2718extern int __signbitl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2719 __attribute__ ((__const__));
2720extern int __isinfl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2721 __attribute__ ((__const__));
2722extern int __finitel (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2723 __attribute__ ((__const__));
2724extern int __isnanl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2725 __attribute__ ((__const__));
2726extern int __iseqsigl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2727extern int __issignalingl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2728 __attribute__ ((__const__));
2729 extern long double acosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __acosl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2730 extern long double asinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __asinl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2731 extern long double atanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atanl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2732 extern long double atan2l (long double __y, long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atan2l (long double __y, long double __x) __attribute__ ((__nothrow__ , __leaf__));
2733 extern long double cosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __cosl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2734 extern long double sinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sinl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2735 extern long double tanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tanl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2736 extern long double coshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __coshl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2737 extern long double sinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2738 extern long double tanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2739 extern void sincosl (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__ , __leaf__));
2740 extern long double acoshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __acoshl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2741 extern long double asinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __asinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2742 extern long double atanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2743 extern long double expl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __expl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2744extern long double frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern long double __frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
2745extern long double ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern long double __ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
2746 extern long double logl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __logl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2747 extern long double log10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log10l (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2748extern long double modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern long double __modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2749 extern long double exp10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __exp10l (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2750 extern long double expm1l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __expm1l (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2751 extern long double log1pl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log1pl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2752extern long double logbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __logbl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2753 extern long double exp2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __exp2l (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2754 extern long double log2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log2l (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2755 extern long double powl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __powl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2756extern long double sqrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sqrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2757 extern long double hypotl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __hypotl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2758 extern long double cbrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __cbrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2759extern long double ceill (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __ceill (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2760extern long double fabsl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2761extern long double floorl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __floorl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2762extern long double fmodl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fmodl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2763extern int isinfl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2764 __attribute__ ((__const__));
2765extern int finitel (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2766 __attribute__ ((__const__));
2767extern long double dreml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __dreml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2768extern long double significandl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __significandl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2769extern long double copysignl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2770extern long double nanl (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nanl (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
2771extern int isnanl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2772 __attribute__ ((__const__));
2773extern long double j0l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __j0l (long double) __attribute__ ((__nothrow__ , __leaf__));
2774extern long double j1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __j1l (long double) __attribute__ ((__nothrow__ , __leaf__));
2775extern long double jnl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __jnl (int, long double) __attribute__ ((__nothrow__ , __leaf__));
2776extern long double y0l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __y0l (long double) __attribute__ ((__nothrow__ , __leaf__));
2777extern long double y1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __y1l (long double) __attribute__ ((__nothrow__ , __leaf__));
2778extern long double ynl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __ynl (int, long double) __attribute__ ((__nothrow__ , __leaf__));
2779 extern long double erfl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __erfl (long double) __attribute__ ((__nothrow__ , __leaf__));
2780 extern long double erfcl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __erfcl (long double) __attribute__ ((__nothrow__ , __leaf__));
2781extern long double lgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __lgammal (long double) __attribute__ ((__nothrow__ , __leaf__));
2782extern long double tgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tgammal (long double) __attribute__ ((__nothrow__ , __leaf__));
2783extern long double gammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __gammal (long double) __attribute__ ((__nothrow__ , __leaf__));
2784extern long double lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern long double __lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
2785extern long double rintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __rintl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2786extern long double nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2787extern long double nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2788extern long double nextdownl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nextdownl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2789extern long double nextupl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nextupl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2790extern long double remainderl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __remainderl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2791extern long double scalbnl (long double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalbnl (long double __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
2792extern int ilogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2793extern long int llogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2794extern long double scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
2795extern long double nearbyintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nearbyintl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2796extern long double roundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __roundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2797extern long double truncl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __truncl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2798extern long double remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern long double __remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
2799extern long int lrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2800__extension__
2801extern long long int llrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2802extern long int lroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2803__extension__
2804extern long long int llroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2805extern long double fdiml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fdiml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2806extern long double fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2807extern long double fminl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fminl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2808extern long double fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__ , __leaf__));
2809extern long double roundevenl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __roundevenl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2810extern __intmax_t fromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2811extern __uintmax_t ufromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2812extern __intmax_t fromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2813extern __uintmax_t ufromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2814extern int canonicalizel (long double *__cx, const long double *__x) __attribute__ ((__nothrow__ , __leaf__));
2815extern long double fmaxmagl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fmaxmagl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2816extern long double fminmagl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fminmagl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2817extern long double fmaximuml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fmaximuml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2818extern long double fminimuml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fminimuml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2819extern long double fmaximum_numl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fmaximum_numl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2820extern long double fminimum_numl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fminimum_numl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2821extern long double fmaximum_magl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fmaximum_magl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2822extern long double fminimum_magl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fminimum_magl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2823extern long double fmaximum_mag_numl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fmaximum_mag_numl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2824extern long double fminimum_mag_numl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fminimum_mag_numl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2825extern int totalorderl (const long double *__x, const long double *__y) __attribute__ ((__nothrow__ , __leaf__))
2826 __attribute__ ((__pure__));
2827extern int totalordermagl (const long double *__x, const long double *__y) __attribute__ ((__nothrow__ , __leaf__))
2828 __attribute__ ((__pure__));
2829extern long double getpayloadl (const long double *__x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __getpayloadl (const long double *__x) __attribute__ ((__nothrow__ , __leaf__));
2830extern int setpayloadl (long double *__x, long double __payload) __attribute__ ((__nothrow__ , __leaf__));
2831extern int setpayloadsigl (long double *__x, long double __payload) __attribute__ ((__nothrow__ , __leaf__));
2832extern long double scalbl (long double __x, long double __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalbl (long double __x, long double __n) __attribute__ ((__nothrow__ , __leaf__));
2833 extern _Float32 acosf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __acosf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2834 extern _Float32 asinf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __asinf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2835 extern _Float32 atanf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __atanf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2836 extern _Float32 atan2f32 (_Float32 __y, _Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __atan2f32 (_Float32 __y, _Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2837 extern _Float32 cosf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __cosf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2838 extern _Float32 sinf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __sinf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2839 extern _Float32 tanf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __tanf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2840 extern _Float32 coshf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __coshf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2841 extern _Float32 sinhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __sinhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2842 extern _Float32 tanhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __tanhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2843 extern void sincosf32 (_Float32 __x, _Float32 *__sinx, _Float32 *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf32 (_Float32 __x, _Float32 *__sinx, _Float32 *__cosx) __attribute__ ((__nothrow__ , __leaf__));
2844 extern _Float32 acoshf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __acoshf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2845 extern _Float32 asinhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __asinhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2846 extern _Float32 atanhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __atanhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2847 extern _Float32 expf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __expf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2848extern _Float32 frexpf32 (_Float32 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __frexpf32 (_Float32 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
2849extern _Float32 ldexpf32 (_Float32 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __ldexpf32 (_Float32 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
2850 extern _Float32 logf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __logf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2851 extern _Float32 log10f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __log10f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2852extern _Float32 modff32 (_Float32 __x, _Float32 *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __modff32 (_Float32 __x, _Float32 *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2853 extern _Float32 exp10f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __exp10f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2854 extern _Float32 expm1f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __expm1f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2855 extern _Float32 log1pf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __log1pf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2856extern _Float32 logbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __logbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2857 extern _Float32 exp2f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __exp2f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2858 extern _Float32 log2f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __log2f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2859 extern _Float32 powf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __powf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
2860extern _Float32 sqrtf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __sqrtf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2861 extern _Float32 hypotf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __hypotf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
2862 extern _Float32 cbrtf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __cbrtf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2863extern _Float32 ceilf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __ceilf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2864extern _Float32 fabsf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fabsf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2865extern _Float32 floorf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __floorf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2866extern _Float32 fmodf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __fmodf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
2867extern _Float32 copysignf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __copysignf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2868extern _Float32 nanf32 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nanf32 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
2869extern _Float32 j0f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __j0f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2870extern _Float32 j1f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __j1f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2871extern _Float32 jnf32 (int, _Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __jnf32 (int, _Float32) __attribute__ ((__nothrow__ , __leaf__));
2872extern _Float32 y0f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __y0f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2873extern _Float32 y1f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __y1f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2874extern _Float32 ynf32 (int, _Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __ynf32 (int, _Float32) __attribute__ ((__nothrow__ , __leaf__));
2875 extern _Float32 erff32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __erff32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2876 extern _Float32 erfcf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __erfcf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2877extern _Float32 lgammaf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __lgammaf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2878extern _Float32 tgammaf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __tgammaf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2879extern _Float32 lgammaf32_r (_Float32, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __lgammaf32_r (_Float32, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
2880extern _Float32 rintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __rintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2881extern _Float32 nextafterf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nextafterf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
2882extern _Float32 nextdownf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nextdownf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2883extern _Float32 nextupf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nextupf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2884extern _Float32 remainderf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __remainderf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
2885extern _Float32 scalbnf32 (_Float32 __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __scalbnf32 (_Float32 __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
2886extern int ilogbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2887extern long int llogbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2888extern _Float32 scalblnf32 (_Float32 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __scalblnf32 (_Float32 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
2889extern _Float32 nearbyintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nearbyintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2890extern _Float32 roundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __roundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2891extern _Float32 truncf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __truncf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2892extern _Float32 remquof32 (_Float32 __x, _Float32 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __remquof32 (_Float32 __x, _Float32 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
2893extern long int lrintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2894__extension__
2895extern long long int llrintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2896extern long int lroundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2897__extension__
2898extern long long int llroundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2899extern _Float32 fdimf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __fdimf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
2900extern _Float32 fmaxf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fmaxf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2901extern _Float32 fminf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fminf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2902extern _Float32 fmaf32 (_Float32 __x, _Float32 __y, _Float32 __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __fmaf32 (_Float32 __x, _Float32 __y, _Float32 __z) __attribute__ ((__nothrow__ , __leaf__));
2903extern _Float32 roundevenf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __roundevenf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2904extern __intmax_t fromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2905extern __uintmax_t ufromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2906extern __intmax_t fromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2907extern __uintmax_t ufromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2908extern int canonicalizef32 (_Float32 *__cx, const _Float32 *__x) __attribute__ ((__nothrow__ , __leaf__));
2909extern _Float32 fmaxmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fmaxmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2910extern _Float32 fminmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fminmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2911extern _Float32 fmaximumf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fmaximumf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2912extern _Float32 fminimumf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fminimumf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2913extern _Float32 fmaximum_numf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fmaximum_numf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2914extern _Float32 fminimum_numf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fminimum_numf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2915extern _Float32 fmaximum_magf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fmaximum_magf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2916extern _Float32 fminimum_magf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fminimum_magf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2917extern _Float32 fmaximum_mag_numf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fmaximum_mag_numf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2918extern _Float32 fminimum_mag_numf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fminimum_mag_numf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2919extern int totalorderf32 (const _Float32 *__x, const _Float32 *__y) __attribute__ ((__nothrow__ , __leaf__))
2920 __attribute__ ((__pure__));
2921extern int totalordermagf32 (const _Float32 *__x, const _Float32 *__y) __attribute__ ((__nothrow__ , __leaf__))
2922 __attribute__ ((__pure__));
2923extern _Float32 getpayloadf32 (const _Float32 *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __getpayloadf32 (const _Float32 *__x) __attribute__ ((__nothrow__ , __leaf__));
2924extern int setpayloadf32 (_Float32 *__x, _Float32 __payload) __attribute__ ((__nothrow__ , __leaf__));
2925extern int setpayloadsigf32 (_Float32 *__x, _Float32 __payload) __attribute__ ((__nothrow__ , __leaf__));
2926 extern _Float64 acosf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __acosf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2927 extern _Float64 asinf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __asinf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2928 extern _Float64 atanf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __atanf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2929 extern _Float64 atan2f64 (_Float64 __y, _Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __atan2f64 (_Float64 __y, _Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2930 extern _Float64 cosf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __cosf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2931 extern _Float64 sinf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __sinf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2932 extern _Float64 tanf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __tanf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2933 extern _Float64 coshf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __coshf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2934 extern _Float64 sinhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __sinhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2935 extern _Float64 tanhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __tanhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2936 extern void sincosf64 (_Float64 __x, _Float64 *__sinx, _Float64 *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf64 (_Float64 __x, _Float64 *__sinx, _Float64 *__cosx) __attribute__ ((__nothrow__ , __leaf__));
2937 extern _Float64 acoshf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __acoshf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2938 extern _Float64 asinhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __asinhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2939 extern _Float64 atanhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __atanhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2940 extern _Float64 expf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __expf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2941extern _Float64 frexpf64 (_Float64 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __frexpf64 (_Float64 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
2942extern _Float64 ldexpf64 (_Float64 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __ldexpf64 (_Float64 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
2943 extern _Float64 logf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __logf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2944 extern _Float64 log10f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __log10f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2945extern _Float64 modff64 (_Float64 __x, _Float64 *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __modff64 (_Float64 __x, _Float64 *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2946 extern _Float64 exp10f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __exp10f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2947 extern _Float64 expm1f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __expm1f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2948 extern _Float64 log1pf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __log1pf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2949extern _Float64 logbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __logbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2950 extern _Float64 exp2f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __exp2f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2951 extern _Float64 log2f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __log2f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2952 extern _Float64 powf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __powf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
2953extern _Float64 sqrtf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __sqrtf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2954 extern _Float64 hypotf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __hypotf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
2955 extern _Float64 cbrtf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __cbrtf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2956extern _Float64 ceilf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __ceilf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2957extern _Float64 fabsf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fabsf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2958extern _Float64 floorf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __floorf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2959extern _Float64 fmodf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __fmodf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
2960extern _Float64 copysignf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __copysignf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2961extern _Float64 nanf64 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nanf64 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
2962extern _Float64 j0f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __j0f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
2963extern _Float64 j1f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __j1f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
2964extern _Float64 jnf64 (int, _Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __jnf64 (int, _Float64) __attribute__ ((__nothrow__ , __leaf__));
2965extern _Float64 y0f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __y0f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
2966extern _Float64 y1f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __y1f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
2967extern _Float64 ynf64 (int, _Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __ynf64 (int, _Float64) __attribute__ ((__nothrow__ , __leaf__));
2968 extern _Float64 erff64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __erff64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
2969 extern _Float64 erfcf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __erfcf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
2970extern _Float64 lgammaf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __lgammaf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
2971extern _Float64 tgammaf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __tgammaf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
2972extern _Float64 lgammaf64_r (_Float64, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __lgammaf64_r (_Float64, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
2973extern _Float64 rintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __rintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2974extern _Float64 nextafterf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nextafterf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
2975extern _Float64 nextdownf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nextdownf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2976extern _Float64 nextupf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nextupf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2977extern _Float64 remainderf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __remainderf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
2978extern _Float64 scalbnf64 (_Float64 __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __scalbnf64 (_Float64 __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
2979extern int ilogbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2980extern long int llogbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2981extern _Float64 scalblnf64 (_Float64 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __scalblnf64 (_Float64 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
2982extern _Float64 nearbyintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nearbyintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2983extern _Float64 roundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __roundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2984extern _Float64 truncf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __truncf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2985extern _Float64 remquof64 (_Float64 __x, _Float64 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __remquof64 (_Float64 __x, _Float64 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
2986extern long int lrintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2987__extension__
2988extern long long int llrintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2989extern long int lroundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2990__extension__
2991extern long long int llroundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2992extern _Float64 fdimf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __fdimf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
2993extern _Float64 fmaxf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fmaxf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2994extern _Float64 fminf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fminf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2995extern _Float64 fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) __attribute__ ((__nothrow__ , __leaf__));
2996extern _Float64 roundevenf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __roundevenf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2997extern __intmax_t fromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2998extern __uintmax_t ufromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2999extern __intmax_t fromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3000extern __uintmax_t ufromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3001extern int canonicalizef64 (_Float64 *__cx, const _Float64 *__x) __attribute__ ((__nothrow__ , __leaf__));
3002extern _Float64 fmaxmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fmaxmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3003extern _Float64 fminmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fminmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3004extern _Float64 fmaximumf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fmaximumf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3005extern _Float64 fminimumf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fminimumf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3006extern _Float64 fmaximum_numf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fmaximum_numf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3007extern _Float64 fminimum_numf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fminimum_numf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3008extern _Float64 fmaximum_magf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fmaximum_magf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3009extern _Float64 fminimum_magf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fminimum_magf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3010extern _Float64 fmaximum_mag_numf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fmaximum_mag_numf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3011extern _Float64 fminimum_mag_numf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fminimum_mag_numf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3012extern int totalorderf64 (const _Float64 *__x, const _Float64 *__y) __attribute__ ((__nothrow__ , __leaf__))
3013 __attribute__ ((__pure__));
3014extern int totalordermagf64 (const _Float64 *__x, const _Float64 *__y) __attribute__ ((__nothrow__ , __leaf__))
3015 __attribute__ ((__pure__));
3016extern _Float64 getpayloadf64 (const _Float64 *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __getpayloadf64 (const _Float64 *__x) __attribute__ ((__nothrow__ , __leaf__));
3017extern int setpayloadf64 (_Float64 *__x, _Float64 __payload) __attribute__ ((__nothrow__ , __leaf__));
3018extern int setpayloadsigf64 (_Float64 *__x, _Float64 __payload) __attribute__ ((__nothrow__ , __leaf__));
3019extern int __fpclassifyf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__))
3020 __attribute__ ((__const__));
3021extern int __signbitf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__))
3022 __attribute__ ((__const__));
3023extern int __isinff128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__))
3024 __attribute__ ((__const__));
3025extern int __finitef128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__))
3026 __attribute__ ((__const__));
3027extern int __isnanf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__))
3028 __attribute__ ((__const__));
3029extern int __iseqsigf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3030extern int __issignalingf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__))
3031 __attribute__ ((__const__));
3032 extern _Float128 acosf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __acosf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3033 extern _Float128 asinf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __asinf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3034 extern _Float128 atanf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __atanf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3035 extern _Float128 atan2f128 (_Float128 __y, _Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __atan2f128 (_Float128 __y, _Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3036 extern _Float128 cosf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __cosf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3037 extern _Float128 sinf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __sinf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3038 extern _Float128 tanf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __tanf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3039 extern _Float128 coshf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __coshf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3040 extern _Float128 sinhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __sinhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3041 extern _Float128 tanhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __tanhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3042 extern void sincosf128 (_Float128 __x, _Float128 *__sinx, _Float128 *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf128 (_Float128 __x, _Float128 *__sinx, _Float128 *__cosx) __attribute__ ((__nothrow__ , __leaf__));
3043 extern _Float128 acoshf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __acoshf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3044 extern _Float128 asinhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __asinhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3045 extern _Float128 atanhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __atanhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3046 extern _Float128 expf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __expf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3047extern _Float128 frexpf128 (_Float128 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __frexpf128 (_Float128 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
3048extern _Float128 ldexpf128 (_Float128 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __ldexpf128 (_Float128 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
3049 extern _Float128 logf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __logf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3050 extern _Float128 log10f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __log10f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3051extern _Float128 modff128 (_Float128 __x, _Float128 *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __modff128 (_Float128 __x, _Float128 *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
3052 extern _Float128 exp10f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __exp10f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3053 extern _Float128 expm1f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __expm1f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3054 extern _Float128 log1pf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __log1pf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3055extern _Float128 logbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __logbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3056 extern _Float128 exp2f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __exp2f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3057 extern _Float128 log2f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __log2f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3058 extern _Float128 powf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __powf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3059extern _Float128 sqrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __sqrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3060 extern _Float128 hypotf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __hypotf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3061 extern _Float128 cbrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __cbrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3062extern _Float128 ceilf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __ceilf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3063extern _Float128 fabsf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fabsf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3064extern _Float128 floorf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __floorf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3065extern _Float128 fmodf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __fmodf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3066extern _Float128 copysignf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __copysignf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3067extern _Float128 nanf128 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nanf128 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
3068extern _Float128 j0f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __j0f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3069extern _Float128 j1f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __j1f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3070extern _Float128 jnf128 (int, _Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __jnf128 (int, _Float128) __attribute__ ((__nothrow__ , __leaf__));
3071extern _Float128 y0f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __y0f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3072extern _Float128 y1f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __y1f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3073extern _Float128 ynf128 (int, _Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __ynf128 (int, _Float128) __attribute__ ((__nothrow__ , __leaf__));
3074 extern _Float128 erff128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __erff128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3075 extern _Float128 erfcf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __erfcf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3076extern _Float128 lgammaf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __lgammaf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3077extern _Float128 tgammaf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __tgammaf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3078extern _Float128 lgammaf128_r (_Float128, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __lgammaf128_r (_Float128, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
3079extern _Float128 rintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __rintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3080extern _Float128 nextafterf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nextafterf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3081extern _Float128 nextdownf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nextdownf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3082extern _Float128 nextupf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nextupf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3083extern _Float128 remainderf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __remainderf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3084extern _Float128 scalbnf128 (_Float128 __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __scalbnf128 (_Float128 __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
3085extern int ilogbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3086extern long int llogbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3087extern _Float128 scalblnf128 (_Float128 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __scalblnf128 (_Float128 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
3088extern _Float128 nearbyintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nearbyintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3089extern _Float128 roundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __roundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3090extern _Float128 truncf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __truncf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3091extern _Float128 remquof128 (_Float128 __x, _Float128 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __remquof128 (_Float128 __x, _Float128 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
3092extern long int lrintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3093__extension__
3094extern long long int llrintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3095extern long int lroundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3096__extension__
3097extern long long int llroundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3098extern _Float128 fdimf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __fdimf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3099extern _Float128 fmaxf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fmaxf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3100extern _Float128 fminf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fminf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3101extern _Float128 fmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __fmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) __attribute__ ((__nothrow__ , __leaf__));
3102extern _Float128 roundevenf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __roundevenf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3103extern __intmax_t fromfpf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3104extern __uintmax_t ufromfpf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3105extern __intmax_t fromfpxf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3106extern __uintmax_t ufromfpxf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3107extern int canonicalizef128 (_Float128 *__cx, const _Float128 *__x) __attribute__ ((__nothrow__ , __leaf__));
3108extern _Float128 fmaxmagf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fmaxmagf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3109extern _Float128 fminmagf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fminmagf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3110extern _Float128 fmaximumf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fmaximumf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3111extern _Float128 fminimumf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fminimumf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3112extern _Float128 fmaximum_numf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fmaximum_numf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3113extern _Float128 fminimum_numf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fminimum_numf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3114extern _Float128 fmaximum_magf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fmaximum_magf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3115extern _Float128 fminimum_magf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fminimum_magf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3116extern _Float128 fmaximum_mag_numf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fmaximum_mag_numf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3117extern _Float128 fminimum_mag_numf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fminimum_mag_numf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3118extern int totalorderf128 (const _Float128 *__x, const _Float128 *__y) __attribute__ ((__nothrow__ , __leaf__))
3119 __attribute__ ((__pure__));
3120extern int totalordermagf128 (const _Float128 *__x, const _Float128 *__y) __attribute__ ((__nothrow__ , __leaf__))
3121 __attribute__ ((__pure__));
3122extern _Float128 getpayloadf128 (const _Float128 *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __getpayloadf128 (const _Float128 *__x) __attribute__ ((__nothrow__ , __leaf__));
3123extern int setpayloadf128 (_Float128 *__x, _Float128 __payload) __attribute__ ((__nothrow__ , __leaf__));
3124extern int setpayloadsigf128 (_Float128 *__x, _Float128 __payload) __attribute__ ((__nothrow__ , __leaf__));
3125 extern _Float32x acosf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __acosf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3126 extern _Float32x asinf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __asinf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3127 extern _Float32x atanf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __atanf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3128 extern _Float32x atan2f32x (_Float32x __y, _Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __atan2f32x (_Float32x __y, _Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3129 extern _Float32x cosf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __cosf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3130 extern _Float32x sinf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __sinf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3131 extern _Float32x tanf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __tanf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3132 extern _Float32x coshf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __coshf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3133 extern _Float32x sinhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __sinhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3134 extern _Float32x tanhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __tanhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3135 extern void sincosf32x (_Float32x __x, _Float32x *__sinx, _Float32x *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf32x (_Float32x __x, _Float32x *__sinx, _Float32x *__cosx) __attribute__ ((__nothrow__ , __leaf__));
3136 extern _Float32x acoshf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __acoshf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3137 extern _Float32x asinhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __asinhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3138 extern _Float32x atanhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __atanhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3139 extern _Float32x expf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __expf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3140extern _Float32x frexpf32x (_Float32x __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __frexpf32x (_Float32x __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
3141extern _Float32x ldexpf32x (_Float32x __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __ldexpf32x (_Float32x __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
3142 extern _Float32x logf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __logf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3143 extern _Float32x log10f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __log10f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3144extern _Float32x modff32x (_Float32x __x, _Float32x *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __modff32x (_Float32x __x, _Float32x *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
3145 extern _Float32x exp10f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __exp10f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3146 extern _Float32x expm1f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __expm1f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3147 extern _Float32x log1pf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __log1pf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3148extern _Float32x logbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __logbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3149 extern _Float32x exp2f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __exp2f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3150 extern _Float32x log2f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __log2f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3151 extern _Float32x powf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __powf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3152extern _Float32x sqrtf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __sqrtf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3153 extern _Float32x hypotf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __hypotf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3154 extern _Float32x cbrtf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __cbrtf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3155extern _Float32x ceilf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __ceilf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3156extern _Float32x fabsf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fabsf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3157extern _Float32x floorf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __floorf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3158extern _Float32x fmodf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __fmodf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3159extern _Float32x copysignf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __copysignf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3160extern _Float32x nanf32x (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nanf32x (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
3161extern _Float32x j0f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __j0f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3162extern _Float32x j1f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __j1f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3163extern _Float32x jnf32x (int, _Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __jnf32x (int, _Float32x) __attribute__ ((__nothrow__ , __leaf__));
3164extern _Float32x y0f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __y0f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3165extern _Float32x y1f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __y1f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3166extern _Float32x ynf32x (int, _Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __ynf32x (int, _Float32x) __attribute__ ((__nothrow__ , __leaf__));
3167 extern _Float32x erff32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __erff32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3168 extern _Float32x erfcf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __erfcf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3169extern _Float32x lgammaf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __lgammaf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3170extern _Float32x tgammaf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __tgammaf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3171extern _Float32x lgammaf32x_r (_Float32x, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __lgammaf32x_r (_Float32x, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
3172extern _Float32x rintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __rintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3173extern _Float32x nextafterf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nextafterf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3174extern _Float32x nextdownf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nextdownf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3175extern _Float32x nextupf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nextupf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3176extern _Float32x remainderf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __remainderf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3177extern _Float32x scalbnf32x (_Float32x __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __scalbnf32x (_Float32x __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
3178extern int ilogbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3179extern long int llogbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3180extern _Float32x scalblnf32x (_Float32x __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __scalblnf32x (_Float32x __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
3181extern _Float32x nearbyintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nearbyintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3182extern _Float32x roundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __roundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3183extern _Float32x truncf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __truncf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3184extern _Float32x remquof32x (_Float32x __x, _Float32x __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __remquof32x (_Float32x __x, _Float32x __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
3185extern long int lrintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3186__extension__
3187extern long long int llrintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3188extern long int lroundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3189__extension__
3190extern long long int llroundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3191extern _Float32x fdimf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __fdimf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3192extern _Float32x fmaxf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fmaxf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3193extern _Float32x fminf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fminf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3194extern _Float32x fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) __attribute__ ((__nothrow__ , __leaf__));
3195extern _Float32x roundevenf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __roundevenf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3196extern __intmax_t fromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3197extern __uintmax_t ufromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3198extern __intmax_t fromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3199extern __uintmax_t ufromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3200extern int canonicalizef32x (_Float32x *__cx, const _Float32x *__x) __attribute__ ((__nothrow__ , __leaf__));
3201extern _Float32x fmaxmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fmaxmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3202extern _Float32x fminmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fminmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3203extern _Float32x fmaximumf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fmaximumf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3204extern _Float32x fminimumf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fminimumf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3205extern _Float32x fmaximum_numf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fmaximum_numf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3206extern _Float32x fminimum_numf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fminimum_numf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3207extern _Float32x fmaximum_magf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fmaximum_magf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3208extern _Float32x fminimum_magf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fminimum_magf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3209extern _Float32x fmaximum_mag_numf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fmaximum_mag_numf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3210extern _Float32x fminimum_mag_numf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fminimum_mag_numf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3211extern int totalorderf32x (const _Float32x *__x, const _Float32x *__y) __attribute__ ((__nothrow__ , __leaf__))
3212 __attribute__ ((__pure__));
3213extern int totalordermagf32x (const _Float32x *__x, const _Float32x *__y) __attribute__ ((__nothrow__ , __leaf__))
3214 __attribute__ ((__pure__));
3215extern _Float32x getpayloadf32x (const _Float32x *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __getpayloadf32x (const _Float32x *__x) __attribute__ ((__nothrow__ , __leaf__));
3216extern int setpayloadf32x (_Float32x *__x, _Float32x __payload) __attribute__ ((__nothrow__ , __leaf__));
3217extern int setpayloadsigf32x (_Float32x *__x, _Float32x __payload) __attribute__ ((__nothrow__ , __leaf__));
3218 extern _Float64x acosf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __acosf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3219 extern _Float64x asinf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __asinf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3220 extern _Float64x atanf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __atanf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3221 extern _Float64x atan2f64x (_Float64x __y, _Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __atan2f64x (_Float64x __y, _Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3222 extern _Float64x cosf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __cosf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3223 extern _Float64x sinf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __sinf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3224 extern _Float64x tanf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __tanf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3225 extern _Float64x coshf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __coshf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3226 extern _Float64x sinhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __sinhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3227 extern _Float64x tanhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __tanhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3228 extern void sincosf64x (_Float64x __x, _Float64x *__sinx, _Float64x *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf64x (_Float64x __x, _Float64x *__sinx, _Float64x *__cosx) __attribute__ ((__nothrow__ , __leaf__));
3229 extern _Float64x acoshf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __acoshf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3230 extern _Float64x asinhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __asinhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3231 extern _Float64x atanhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __atanhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3232 extern _Float64x expf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __expf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3233extern _Float64x frexpf64x (_Float64x __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __frexpf64x (_Float64x __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
3234extern _Float64x ldexpf64x (_Float64x __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __ldexpf64x (_Float64x __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
3235 extern _Float64x logf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __logf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3236 extern _Float64x log10f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __log10f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3237extern _Float64x modff64x (_Float64x __x, _Float64x *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __modff64x (_Float64x __x, _Float64x *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
3238 extern _Float64x exp10f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __exp10f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3239 extern _Float64x expm1f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __expm1f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3240 extern _Float64x log1pf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __log1pf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3241extern _Float64x logbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __logbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3242 extern _Float64x exp2f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __exp2f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3243 extern _Float64x log2f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __log2f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3244 extern _Float64x powf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __powf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3245extern _Float64x sqrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __sqrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3246 extern _Float64x hypotf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __hypotf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3247 extern _Float64x cbrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __cbrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3248extern _Float64x ceilf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __ceilf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3249extern _Float64x fabsf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fabsf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3250extern _Float64x floorf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __floorf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3251extern _Float64x fmodf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __fmodf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3252extern _Float64x copysignf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __copysignf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3253extern _Float64x nanf64x (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nanf64x (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
3254extern _Float64x j0f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __j0f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3255extern _Float64x j1f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __j1f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3256extern _Float64x jnf64x (int, _Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __jnf64x (int, _Float64x) __attribute__ ((__nothrow__ , __leaf__));
3257extern _Float64x y0f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __y0f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3258extern _Float64x y1f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __y1f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3259extern _Float64x ynf64x (int, _Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __ynf64x (int, _Float64x) __attribute__ ((__nothrow__ , __leaf__));
3260 extern _Float64x erff64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __erff64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3261 extern _Float64x erfcf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __erfcf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3262extern _Float64x lgammaf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __lgammaf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3263extern _Float64x tgammaf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __tgammaf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3264extern _Float64x lgammaf64x_r (_Float64x, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __lgammaf64x_r (_Float64x, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
3265extern _Float64x rintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __rintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3266extern _Float64x nextafterf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nextafterf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3267extern _Float64x nextdownf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nextdownf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3268extern _Float64x nextupf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nextupf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3269extern _Float64x remainderf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __remainderf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3270extern _Float64x scalbnf64x (_Float64x __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __scalbnf64x (_Float64x __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
3271extern int ilogbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3272extern long int llogbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3273extern _Float64x scalblnf64x (_Float64x __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __scalblnf64x (_Float64x __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
3274extern _Float64x nearbyintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nearbyintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3275extern _Float64x roundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __roundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3276extern _Float64x truncf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __truncf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3277extern _Float64x remquof64x (_Float64x __x, _Float64x __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __remquof64x (_Float64x __x, _Float64x __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
3278extern long int lrintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3279__extension__
3280extern long long int llrintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3281extern long int lroundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3282__extension__
3283extern long long int llroundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3284extern _Float64x fdimf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __fdimf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3285extern _Float64x fmaxf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fmaxf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3286extern _Float64x fminf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fminf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3287extern _Float64x fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) __attribute__ ((__nothrow__ , __leaf__));
3288extern _Float64x roundevenf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __roundevenf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3289extern __intmax_t fromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3290extern __uintmax_t ufromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3291extern __intmax_t fromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3292extern __uintmax_t ufromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3293extern int canonicalizef64x (_Float64x *__cx, const _Float64x *__x) __attribute__ ((__nothrow__ , __leaf__));
3294extern _Float64x fmaxmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fmaxmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3295extern _Float64x fminmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fminmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3296extern _Float64x fmaximumf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fmaximumf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3297extern _Float64x fminimumf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fminimumf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3298extern _Float64x fmaximum_numf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fmaximum_numf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3299extern _Float64x fminimum_numf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fminimum_numf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3300extern _Float64x fmaximum_magf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fmaximum_magf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3301extern _Float64x fminimum_magf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fminimum_magf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3302extern _Float64x fmaximum_mag_numf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fmaximum_mag_numf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3303extern _Float64x fminimum_mag_numf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fminimum_mag_numf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3304extern int totalorderf64x (const _Float64x *__x, const _Float64x *__y) __attribute__ ((__nothrow__ , __leaf__))
3305 __attribute__ ((__pure__));
3306extern int totalordermagf64x (const _Float64x *__x, const _Float64x *__y) __attribute__ ((__nothrow__ , __leaf__))
3307 __attribute__ ((__pure__));
3308extern _Float64x getpayloadf64x (const _Float64x *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __getpayloadf64x (const _Float64x *__x) __attribute__ ((__nothrow__ , __leaf__));
3309extern int setpayloadf64x (_Float64x *__x, _Float64x __payload) __attribute__ ((__nothrow__ , __leaf__));
3310extern int setpayloadsigf64x (_Float64x *__x, _Float64x __payload) __attribute__ ((__nothrow__ , __leaf__));
3311extern float fadd (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
3312extern float fdiv (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
3313extern float ffma (double __x, double __y, double __z) __attribute__ ((__nothrow__ , __leaf__));
3314extern float fmul (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
3315extern float fsqrt (double __x) __attribute__ ((__nothrow__ , __leaf__));
3316extern float fsub (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
3317extern float faddl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3318extern float fdivl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3319extern float ffmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__ , __leaf__));
3320extern float fmull (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3321extern float fsqrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
3322extern float fsubl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3323extern double daddl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3324extern double ddivl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3325extern double dfmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__ , __leaf__));
3326extern double dmull (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3327extern double dsqrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
3328extern double dsubl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3329extern _Float32 f32addf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3330extern _Float32 f32divf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3331extern _Float32 f32fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) __attribute__ ((__nothrow__ , __leaf__));
3332extern _Float32 f32mulf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3333extern _Float32 f32sqrtf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3334extern _Float32 f32subf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3335extern _Float32 f32addf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3336extern _Float32 f32divf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3337extern _Float32 f32fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) __attribute__ ((__nothrow__ , __leaf__));
3338extern _Float32 f32mulf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3339extern _Float32 f32sqrtf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3340extern _Float32 f32subf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3341extern _Float32 f32addf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3342extern _Float32 f32divf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3343extern _Float32 f32fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) __attribute__ ((__nothrow__ , __leaf__));
3344extern _Float32 f32mulf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3345extern _Float32 f32sqrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3346extern _Float32 f32subf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3347extern _Float32 f32addf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3348extern _Float32 f32divf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3349extern _Float32 f32fmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) __attribute__ ((__nothrow__ , __leaf__));
3350extern _Float32 f32mulf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3351extern _Float32 f32sqrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3352extern _Float32 f32subf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3353extern _Float32x f32xaddf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3354extern _Float32x f32xdivf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3355extern _Float32x f32xfmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) __attribute__ ((__nothrow__ , __leaf__));
3356extern _Float32x f32xmulf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3357extern _Float32x f32xsqrtf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3358extern _Float32x f32xsubf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3359extern _Float32x f32xaddf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3360extern _Float32x f32xdivf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3361extern _Float32x f32xfmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) __attribute__ ((__nothrow__ , __leaf__));
3362extern _Float32x f32xmulf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3363extern _Float32x f32xsqrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3364extern _Float32x f32xsubf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3365extern _Float32x f32xaddf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3366extern _Float32x f32xdivf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3367extern _Float32x f32xfmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) __attribute__ ((__nothrow__ , __leaf__));
3368extern _Float32x f32xmulf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3369extern _Float32x f32xsqrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3370extern _Float32x f32xsubf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3371extern _Float64 f64addf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3372extern _Float64 f64divf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3373extern _Float64 f64fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) __attribute__ ((__nothrow__ , __leaf__));
3374extern _Float64 f64mulf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3375extern _Float64 f64sqrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3376extern _Float64 f64subf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3377extern _Float64 f64addf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3378extern _Float64 f64divf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3379extern _Float64 f64fmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) __attribute__ ((__nothrow__ , __leaf__));
3380extern _Float64 f64mulf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3381extern _Float64 f64sqrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3382extern _Float64 f64subf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3383extern _Float64x f64xaddf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3384extern _Float64x f64xdivf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3385extern _Float64x f64xfmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) __attribute__ ((__nothrow__ , __leaf__));
3386extern _Float64x f64xmulf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3387extern _Float64x f64xsqrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3388extern _Float64x f64xsubf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3389extern int signgam;
3390enum
3391 {
3392 FP_NAN =
3393 0,
3394 FP_INFINITE =
3395 1,
3396 FP_ZERO =
3397 2,
3398 FP_SUBNORMAL =
3399 3,
3400 FP_NORMAL =
3401 4
3402 };
3403extern int __iscanonicall (long double __x)
3404 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3405
3406struct timex
3407{
3408 unsigned int modes;
3409 __syscall_slong_t offset;
3410 __syscall_slong_t freq;
3411 __syscall_slong_t maxerror;
3412 __syscall_slong_t esterror;
3413 int status;
3414 __syscall_slong_t constant;
3415 __syscall_slong_t precision;
3416 __syscall_slong_t tolerance;
3417 struct timeval time;
3418 __syscall_slong_t tick;
3419 __syscall_slong_t ppsfreq;
3420 __syscall_slong_t jitter;
3421 int shift;
3422 __syscall_slong_t stabil;
3423 __syscall_slong_t jitcnt;
3424 __syscall_slong_t calcnt;
3425 __syscall_slong_t errcnt;
3426 __syscall_slong_t stbcnt;
3427 int tai;
3428 int :32; int :32; int :32; int :32;
3429 int :32; int :32; int :32; int :32;
3430 int :32; int :32; int :32;
3431};
3432
3433extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __attribute__ ((__nothrow__ , __leaf__));
3434
3435struct tm
3436{
3437 int tm_sec;
3438 int tm_min;
3439 int tm_hour;
3440 int tm_mday;
3441 int tm_mon;
3442 int tm_year;
3443 int tm_wday;
3444 int tm_yday;
3445 int tm_isdst;
3446 long int tm_gmtoff;
3447 const char *tm_zone;
3448};
3449struct itimerspec
3450 {
3451 struct timespec it_interval;
3452 struct timespec it_value;
3453 };
3454struct sigevent;
3455
3456extern clock_t clock (void) __attribute__ ((__nothrow__ , __leaf__));
3457extern time_t time (time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
3458extern double difftime (time_t __time1, time_t __time0)
3459 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3460extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
3461extern size_t strftime (char *__restrict __s, size_t __maxsize,
3462 const char *__restrict __format,
3463 const struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
3464extern char *strptime (const char *__restrict __s,
3465 const char *__restrict __fmt, struct tm *__tp)
3466 __attribute__ ((__nothrow__ , __leaf__));
3467extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
3468 const char *__restrict __format,
3469 const struct tm *__restrict __tp,
3470 locale_t __loc) __attribute__ ((__nothrow__ , __leaf__));
3471extern char *strptime_l (const char *__restrict __s,
3472 const char *__restrict __fmt, struct tm *__tp,
3473 locale_t __loc) __attribute__ ((__nothrow__ , __leaf__));
3474extern struct tm *gmtime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
3475extern struct tm *localtime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
3476extern struct tm *gmtime_r (const time_t *__restrict __timer,
3477 struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
3478extern struct tm *localtime_r (const time_t *__restrict __timer,
3479 struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
3480extern char *asctime (const struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
3481extern char *ctime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
3482extern char *asctime_r (const struct tm *__restrict __tp,
3483 char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
3484extern char *ctime_r (const time_t *__restrict __timer,
3485 char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
3486extern char *__tzname[2];
3487extern int __daylight;
3488extern long int __timezone;
3489extern char *tzname[2];
3490extern void tzset (void) __attribute__ ((__nothrow__ , __leaf__));
3491extern int daylight;
3492extern long int timezone;
3493extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
3494extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
3495extern int dysize (int __year) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3496extern int nanosleep (const struct timespec *__requested_time,
3497 struct timespec *__remaining);
3498extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__ , __leaf__));
3499extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__ , __leaf__));
3500extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
3501 __attribute__ ((__nothrow__ , __leaf__));
3502extern int clock_nanosleep (clockid_t __clock_id, int __flags,
3503 const struct timespec *__req,
3504 struct timespec *__rem);
3505extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__ , __leaf__));
3506extern int timer_create (clockid_t __clock_id,
3507 struct sigevent *__restrict __evp,
3508 timer_t *__restrict __timerid) __attribute__ ((__nothrow__ , __leaf__));
3509extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__));
3510extern int timer_settime (timer_t __timerid, int __flags,
3511 const struct itimerspec *__restrict __value,
3512 struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__ , __leaf__));
3513extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
3514 __attribute__ ((__nothrow__ , __leaf__));
3515extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__));
3516extern int timespec_get (struct timespec *__ts, int __base)
3517 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3518extern int timespec_getres (struct timespec *__ts, int __base)
3519 __attribute__ ((__nothrow__ , __leaf__));
3520extern int getdate_err;
3521extern struct tm *getdate (const char *__string);
3522extern int getdate_r (const char *__restrict __string,
3523 struct tm *__restrict __resbufp);
3524
3525
3526struct timezone
3527 {
3528 int tz_minuteswest;
3529 int tz_dsttime;
3530 };
3531extern int gettimeofday (struct timeval *__restrict __tv,
3532 void *__restrict __tz) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3533extern int settimeofday (const struct timeval *__tv,
3534 const struct timezone *__tz)
3535 __attribute__ ((__nothrow__ , __leaf__));
3536extern int adjtime (const struct timeval *__delta,
3537 struct timeval *__olddelta) __attribute__ ((__nothrow__ , __leaf__));
3538enum __itimer_which
3539 {
3540 ITIMER_REAL = 0,
3541 ITIMER_VIRTUAL = 1,
3542 ITIMER_PROF = 2
3543 };
3544struct itimerval
3545 {
3546 struct timeval it_interval;
3547 struct timeval it_value;
3548 };
3549typedef enum __itimer_which __itimer_which_t;
3550extern int getitimer (__itimer_which_t __which,
3551 struct itimerval *__value) __attribute__ ((__nothrow__ , __leaf__));
3552extern int setitimer (__itimer_which_t __which,
3553 const struct itimerval *__restrict __new,
3554 struct itimerval *__restrict __old) __attribute__ ((__nothrow__ , __leaf__));
3555extern int utimes (const char *__file, const struct timeval __tvp[2])
3556 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3557extern int lutimes (const char *__file, const struct timeval __tvp[2])
3558 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3559extern int futimes (int __fd, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__));
3560extern int futimesat (int __fd, const char *__file,
3561 const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__));
3562
3563
3564
3565extern size_t strlcpy(char *, const char*, size_t);
3566extern size_t strlcat(char *, const char*, size_t);
3567__attribute__((__format__(__printf__, 1, 2)))
3568extern void setproctitle(const char *fmt, ...);
3569
3570
3571__attribute__ ((__visibility__("default"))) extern unsigned long long __attribute__((weak))
3572ruby_abi_version(void)
3573{
3574 return 1;
3575}
3576
3577extern long int __sysconf (int __name) __attribute__ ((__nothrow__ , __leaf__));
3578
3579typedef unsigned long VALUE;
3580typedef unsigned long ID;
3581__extension__ _Static_assert(4 == sizeof(int), "sizeof_int" ": " "SIZEOF_INT == sizeof(int)");
3582__extension__ _Static_assert(8 == sizeof(long), "sizeof_long" ": " "SIZEOF_LONG == sizeof(long)");
3583__extension__ _Static_assert(8 == sizeof(long long), "sizeof_long_long" ": " "SIZEOF_LONG_LONG == sizeof(LONG_LONG)");
3584__extension__ _Static_assert(8 == sizeof(void *), "sizeof_voidp" ": " "SIZEOF_VOIDP == sizeof(void *)");
3585
3586
3587VALUE rb_class_new(VALUE super);
3588VALUE rb_mod_init_copy(VALUE clone, VALUE orig);
3589void rb_check_inheritable(VALUE super);
3590VALUE rb_define_class_id(ID id, VALUE super);
3591VALUE rb_define_class_id_under(VALUE outer, ID id, VALUE super);
3592VALUE rb_module_new(void);
3593VALUE rb_refinement_new(void);
3594VALUE rb_define_module_id(ID id);
3595VALUE rb_define_module_id_under(VALUE outer, ID id);
3596VALUE rb_mod_included_modules(VALUE mod);
3597VALUE rb_mod_include_p(VALUE child, VALUE parent);
3598VALUE rb_mod_ancestors(VALUE mod);
3599VALUE rb_class_descendants(VALUE klass);
3600VALUE rb_class_subclasses(VALUE klass);
3601VALUE rb_class_instance_methods(int argc, const VALUE *argv, VALUE mod);
3602VALUE rb_class_public_instance_methods(int argc, const VALUE *argv, VALUE mod);
3603VALUE rb_class_protected_instance_methods(int argc, const VALUE *argv, VALUE mod);
3604VALUE rb_class_private_instance_methods(int argc, const VALUE *argv, VALUE mod);
3605VALUE rb_obj_singleton_methods(int argc, const VALUE *argv, VALUE obj);
3606void rb_define_method_id(VALUE klass, ID mid, VALUE (*func)(), int arity);
3607void rb_undef(VALUE mod, ID mid);
3608__attribute__((__nonnull__ ()))
3609void rb_define_protected_method(VALUE klass, const char *mid, VALUE (*func)(), int arity);
3610__attribute__((__nonnull__ ()))
3611void rb_define_private_method(VALUE klass, const char *mid, VALUE (*func)(), int arity);
3612__attribute__((__nonnull__ ()))
3613void rb_define_singleton_method(VALUE obj, const char *mid, VALUE(*func)(), int arity);
3614VALUE rb_singleton_class(VALUE obj);
3615
3616
3617
3618
3619int rb_sourceline(void);
3620const char *rb_sourcefile(void);
3621int rb_frame_method_id_and_class(ID *idp, VALUE *klassp);
3622VALUE rb_check_funcall(VALUE recv, ID mid, int argc, const VALUE *argv);
3623VALUE rb_check_funcall_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat);
3624VALUE rb_eval_cmd_kw(VALUE cmd, VALUE arg, int kw_splat);
3625VALUE rb_apply(VALUE recv, ID mid, VALUE args);
3626VALUE rb_obj_instance_eval(int argc, const VALUE *argv, VALUE recv);
3627VALUE rb_obj_instance_exec(int argc, const VALUE *argv, VALUE recv);
3628VALUE rb_mod_module_eval(int argc, const VALUE *argv, VALUE mod);
3629VALUE rb_mod_module_exec(int argc, const VALUE *argv, VALUE mod);
3630typedef VALUE (*rb_alloc_func_t)(VALUE klass);
3631void rb_define_alloc_func(VALUE klass, rb_alloc_func_t func);
3632void rb_undef_alloc_func(VALUE klass);
3635void rb_alias(VALUE klass, ID dst, ID src);
3636void rb_attr(VALUE klass, ID name, int need_reader, int need_writer, int honour_visibility);
3637__attribute__((__nonnull__ ()))
3638void rb_remove_method(VALUE klass, const char *name);
3639void rb_remove_method_id(VALUE klass, ID mid);
3640int rb_method_boundp(VALUE klass, ID id, int ex);
3641int rb_method_basic_definition_p(VALUE klass, ID mid);
3642int rb_obj_respond_to(VALUE obj, ID mid, int private_p);
3643int rb_respond_to(VALUE obj, ID mid);
3644__attribute__((__noreturn__))
3645VALUE rb_f_notimplement(int argc, const VALUE *argv, VALUE obj, VALUE marker);
3646void rb_backtrace(void);
3647VALUE rb_make_backtrace(void);
3648
3649
3650
3651
3652__attribute__((__nonnull__ ()))
3653void rb_define_method(VALUE klass, const char *mid, VALUE (*func)(), int arity);
3654__attribute__((__nonnull__ ()))
3655void rb_define_module_function(VALUE klass, const char *mid, VALUE (*func)(), int arity);
3656__attribute__((__nonnull__ ()))
3657void rb_define_global_function(const char *mid, VALUE (*func)(), int arity);
3658__attribute__((__nonnull__ ()))
3659void rb_undef_method(VALUE klass, const char *name);
3660__attribute__((__nonnull__ ()))
3661void rb_define_alias(VALUE klass, const char *dst, const char *src);
3662__attribute__((__nonnull__ ()))
3663void rb_define_attr(VALUE klass, const char *name, int read, int write);
3664
3665
3666[[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_m3(VALUE, const char *, VALUE(*)(), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_m2(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_m1(VALUE, const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_00(VALUE, const char *, VALUE(*)(VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_01(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_02(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_03(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_04(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_05(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_06(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_07(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_08(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_09(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_10(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_11(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_12(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_13(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_14(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_15(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
3667[[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_m3(VALUE, const char *, VALUE(*)(), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_m2(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_m1(VALUE, const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_00(VALUE, const char *, VALUE(*)(VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_01(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_02(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_03(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_04(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_05(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_06(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_07(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_08(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_09(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_10(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_11(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_12(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_13(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_14(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_15(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
3668[[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_m3(VALUE, const char *, VALUE(*)(), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_m2(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_m1(VALUE, const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_00(VALUE, const char *, VALUE(*)(VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_01(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_02(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_03(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_04(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_05(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_06(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_07(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_08(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_09(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_10(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_11(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_12(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_13(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_14(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_15(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
3669[[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_m3(VALUE, const char *, VALUE(*)(), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_m2(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_m1(VALUE, const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_00(VALUE, const char *, VALUE(*)(VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_01(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_02(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_03(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_04(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_05(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_06(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_07(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_08(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_09(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_10(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_11(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_12(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_13(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_14(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_15(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
3670[[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_m3(const char *, VALUE(*)(), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_m2(const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_m1(const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_00(const char *, VALUE(*)(VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_01(const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_02(const char *, VALUE(*)(VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_03(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_04(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_05(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_06(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_07(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_08(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_09(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_10(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_11(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_12(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_13(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_14(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_15(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
3671[[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_m3(VALUE, ID, VALUE(*)(), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_m2(VALUE, ID, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_m1(VALUE, ID, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_00(VALUE, ID, VALUE(*)(VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_01(VALUE, ID, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_02(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_03(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_04(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_05(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_06(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_07(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_08(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_09(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_10(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_11(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_12(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_13(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_14(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_15(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
3672[[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_m3(VALUE, const char *, VALUE(*)(), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_m2(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_m1(VALUE, const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_00(VALUE, const char *, VALUE(*)(VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_01(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_02(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_03(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_04(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_05(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_06(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_07(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_08(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_09(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_10(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_11(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_12(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_13(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_14(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); [[maybe_unused]] __attribute__((__nonnull__ ())) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_15(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
3673
3674
3675VALUE rb_int2big(intptr_t i);
3676VALUE rb_int2inum(intptr_t i);
3677VALUE rb_uint2big(uintptr_t i);
3678VALUE rb_uint2inum(uintptr_t i);
3679
3680
3681enum
3682
3683ruby_special_consts {
3684 RUBY_Qfalse = 0x00,
3685 RUBY_Qtrue = 0x14,
3686 RUBY_Qnil = 0x08,
3687 RUBY_Qundef = 0x34,
3688 RUBY_IMMEDIATE_MASK = 0x07,
3689 RUBY_FIXNUM_FLAG = 0x01,
3690 RUBY_FLONUM_MASK = 0x03,
3691 RUBY_FLONUM_FLAG = 0x02,
3692 RUBY_SYMBOL_FLAG = 0x0c,
3694};
3695__attribute__((__const__))
3696
3697__attribute__((__artificial__))
3698static inline _Bool
3699RB_TEST(VALUE obj)
3700{
3701 return obj & ~RUBY_Qnil;
3702}
3703__attribute__((__const__))
3704
3705__attribute__((__artificial__))
3706static inline _Bool
3707RB_NIL_P(VALUE obj)
3708{
3709 return obj == RUBY_Qnil;
3710}
3711__attribute__((__const__))
3712
3713__attribute__((__artificial__))
3714static inline _Bool
3715RB_FIXNUM_P(VALUE obj)
3716{
3717 return obj & RUBY_FIXNUM_FLAG;
3718}
3719__attribute__((__const__))
3720
3721__attribute__((__artificial__))
3722static inline _Bool
3723RB_STATIC_SYM_P(VALUE obj)
3724{
3725
3726 const VALUE mask = ~((0x7fffffffffffffffL * 2UL + 1UL) << RUBY_SPECIAL_SHIFT);
3727 return (obj & mask) == RUBY_SYMBOL_FLAG;
3728}
3729__attribute__((__const__))
3730
3731__attribute__((__artificial__))
3732static inline _Bool
3733RB_FLONUM_P(VALUE obj)
3734{
3735 return (obj & RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG;
3736}
3737__attribute__((__const__))
3738
3739__attribute__((__artificial__))
3740static inline _Bool
3741RB_IMMEDIATE_P(VALUE obj)
3742{
3743 return obj & RUBY_IMMEDIATE_MASK;
3744}
3745__attribute__((__const__))
3746
3747__attribute__((__artificial__))
3748static inline _Bool
3749RB_SPECIAL_CONST_P(VALUE obj)
3750{
3751 return RB_IMMEDIATE_P(obj) || ! RB_TEST(obj);
3752}
3753__attribute__((__const__))
3754
3755static inline VALUE
3756rb_special_const_p(VALUE obj)
3757{
3758 return RB_SPECIAL_CONST_P(obj) * RUBY_Qtrue;
3759}
3760
3761
3762__attribute__((__noreturn__))
3763__attribute__((__cold__))
3764void rb_out_of_int(long num);
3765long rb_num2long(VALUE num);
3766unsigned long rb_num2ulong(VALUE num);
3767
3768
3769__attribute__((__const__))
3770
3771__attribute__((__artificial__))
3772static inline VALUE
3773RB_INT2FIX(long i)
3774{
3775 ((void)0);
3776 const unsigned long j = i;
3777 const unsigned long k = 2 * j + RUBY_FIXNUM_FLAG;
3778 const long l = k;
3779 const long m = l;
3780 const VALUE n = m;
3781 ((void)0);
3782 return n;
3783}
3784static inline int
3785rb_long2int_inline(long n)
3786{
3787 int i = ((int)n);
3788 if (sizeof(long) <= sizeof(int)) {
3789 ((__builtin_expect(!!(!!(i == n)), 1)) ? ((void)0) : __builtin_unreachable());
3790 }
3791 if (i != n)
3792 rb_out_of_int(n);
3793 return i;
3794}
3795__attribute__((__const__))
3796
3797static inline long
3798rbimpl_fix2long_by_idiv(VALUE x)
3799{
3800 ((void)0);
3801 const long y = x - RUBY_FIXNUM_FLAG;
3802 const long z = y / 2;
3803 const long w = ((long)z);
3804 ((void)0);
3805 return w;
3806}
3807__attribute__((__const__))
3808
3809static inline long
3810rbimpl_fix2long_by_shift(VALUE x)
3811{
3812 ((void)0);
3813 const long y = x;
3814 const long z = y >> 1;
3815 const long w = ((long)z);
3816 ((void)0);
3817 return w;
3818}
3819__attribute__((__const__))
3820
3821static inline _Bool
3822rbimpl_right_shift_is_arithmetic_p(void)
3823{
3824 return (-1 >> 1) == -1;
3825}
3826__attribute__((__const__))
3827
3828static inline long
3829rb_fix2long(VALUE x)
3830{
3831 if (rbimpl_right_shift_is_arithmetic_p()) {
3832 return rbimpl_fix2long_by_shift(x);
3833 }
3834 else {
3835 return rbimpl_fix2long_by_idiv(x);
3836 }
3837}
3838__attribute__((__const__))
3839
3840static inline unsigned long
3841rb_fix2ulong(VALUE x)
3842{
3843 ((void)0);
3844 return rb_fix2long(x);
3845}
3846static inline long
3847rb_num2long_inline(VALUE x)
3848{
3849 if (RB_FIXNUM_P(x))
3850 return rb_fix2long(x);
3851 else
3852 return rb_num2long(x);
3853}
3854static inline unsigned long
3855rb_num2ulong_inline(VALUE x)
3856{
3857 if (RB_FIXNUM_P(x))
3858 return rb_fix2ulong(x);
3859 else
3860 return rb_num2ulong(x);
3861}
3862static inline VALUE
3863rb_long2num_inline(long v)
3864{
3865 if ((((v) < (0x7fffffffffffffffL / 2) + 1) && ((v) >= ((-0x7fffffffffffffffL - 1L) / 2))))
3866 return RB_INT2FIX(v);
3867 else
3868 return rb_int2big(v);
3869}
3870static inline VALUE
3871rb_ulong2num_inline(unsigned long v)
3872{
3873 if (((v) < (0x7fffffffffffffffL / 2) + 1))
3874 return RB_INT2FIX(v);
3875 else
3876 return rb_uint2big(v);
3877}
3878
3879
3880long rb_num2int(VALUE num);
3881long rb_fix2int(VALUE num);
3882unsigned long rb_num2uint(VALUE num);
3883unsigned long rb_fix2uint(VALUE num);
3884
3885
3886__attribute__((__artificial__))
3887static inline int
3888RB_FIX2INT(VALUE x)
3889{
3890 long ret;
3891 if (sizeof(int) < sizeof(long)) {
3892 ret = rb_fix2int(x);
3893 }
3894 else {
3895 ret = rb_fix2long(x);
3896 }
3897 return ((int)ret);
3898}
3899static inline int
3900rb_num2int_inline(VALUE x)
3901{
3902 long ret;
3903 if (sizeof(int) == sizeof(long)) {
3904 ret = rb_num2long_inline(x);
3905 }
3906 else if (RB_FIXNUM_P(x)) {
3907 ret = rb_fix2int(x);
3908 }
3909 else {
3910 ret = rb_num2int(x);
3911 }
3912 return ((int)ret);
3913}
3914__attribute__((__artificial__))
3915static inline unsigned int
3916RB_NUM2UINT(VALUE x)
3917{
3918 unsigned long ret;
3919 if (sizeof(int) < sizeof(long)) {
3920 ret = rb_num2uint(x);
3921 }
3922 else {
3923 ret = rb_num2ulong_inline(x);
3924 }
3925 return ((unsigned int)ret);
3926}
3927__attribute__((__artificial__))
3928static inline unsigned int
3929RB_FIX2UINT(VALUE x)
3930{
3931 unsigned long ret;
3932 if (sizeof(int) < sizeof(long)) {
3933 ret = rb_fix2uint(x);
3934 }
3935 else {
3936 ret = rb_fix2ulong(x);
3937 }
3938 return ((unsigned int)ret);
3939}
3940
3941
3942
3943
3944static inline VALUE
3945rb_int2num_inline(int v)
3946{
3947 if ((((v) < (0x7fffffffffffffffL / 2) + 1) && ((v) >= ((-0x7fffffffffffffffL - 1L) / 2))))
3948 return RB_INT2FIX(v);
3949 else
3950 return rb_int2big(v);
3951}
3952static inline VALUE
3953rb_uint2num_inline(unsigned int v)
3954{
3955 if (((v) < (0x7fffffffffffffffL / 2) + 1))
3956 return RB_INT2FIX(v);
3957 else
3958 return rb_uint2big(v);
3959}
3960
3961
3962enum ruby_rvalue_flags {
3964};
3965struct
3966__attribute__((__aligned__(8)))
3967RBasic {
3968 VALUE flags;
3969 const VALUE klass;
3970};
3971
3972
3973VALUE rb_obj_hide(VALUE obj);
3974VALUE rb_obj_reveal(VALUE obj, VALUE klass);
3975
3976
3977__attribute__((__pure__))
3978__attribute__((__artificial__))
3979static inline VALUE
3980RBASIC_CLASS(VALUE obj)
3981{
3982 ((void)0);
3983 return ((struct RBasic *)(obj))->klass;
3984}
3985typedef enum {
3989 RB_WARN_CATEGORY_ALL_BITS = 0x6
3991enum rb_io_wait_readwrite {RB_IO_WAIT_READABLE, RB_IO_WAIT_WRITABLE};
3992
3993
3994VALUE rb_errinfo(void);
3995void rb_set_errinfo(VALUE err);
3996__attribute__((__noreturn__))
3997__attribute__((__nonnull__ (2)))
3998__attribute__((__format__(__printf__, 2, 3)))
3999void rb_raise(VALUE exc, const char *fmt, ...);
4000__attribute__((__noreturn__))
4001__attribute__((__nonnull__ (1)))
4002__attribute__((__format__(__printf__, 1, 2)))
4003void rb_fatal(const char *fmt, ...);
4004__attribute__((__cold__))
4005__attribute__((__noreturn__))
4006__attribute__((__nonnull__ (1)))
4007__attribute__((__format__(__printf__, 1, 2)))
4008void rb_bug(const char *fmt, ...);
4009__attribute__((__noreturn__))
4010__attribute__((__nonnull__ ()))
4011void rb_bug_errno(const char *msg, int err);
4012__attribute__((__noreturn__))
4013void rb_sys_fail(const char *msg);
4014__attribute__((__noreturn__))
4015void rb_sys_fail_str(VALUE msg);
4016__attribute__((__noreturn__))
4017__attribute__((__nonnull__ (2)))
4018void rb_mod_sys_fail(VALUE mod, const char *msg);
4019__attribute__((__noreturn__))
4020void rb_mod_sys_fail_str(VALUE mod, VALUE msg);
4021__attribute__((__noreturn__))
4022void rb_readwrite_sys_fail(enum rb_io_wait_readwrite waiting, const char *msg);
4023__attribute__((__noreturn__))
4024void rb_iter_break(void);
4025__attribute__((__noreturn__))
4026void rb_iter_break_value(VALUE val);
4027__attribute__((__noreturn__))
4028void rb_exit(int status);
4029__attribute__((__noreturn__))
4030void rb_notimplement(void);
4031VALUE rb_syserr_new(int err, const char * msg);
4032VALUE rb_syserr_new_str(int n, VALUE arg);
4033__attribute__((__noreturn__))
4034void rb_syserr_fail(int err, const char *msg);
4035__attribute__((__noreturn__))
4036void rb_syserr_fail_str(int err, VALUE msg);
4037__attribute__((__noreturn__))
4038__attribute__((__nonnull__ ()))
4039void rb_mod_syserr_fail(VALUE mod, int err, const char *msg);
4040__attribute__((__noreturn__))
4041void rb_mod_syserr_fail_str(VALUE mod, int err, VALUE msg);
4042__attribute__((__noreturn__))
4043void rb_readwrite_syserr_fail(enum rb_io_wait_readwrite waiting, int err, const char *msg);
4044__attribute__((__cold__))
4045__attribute__((__noreturn__))
4046void rb_unexpected_type(VALUE self, int t);
4047VALUE *rb_ruby_verbose_ptr(void);
4048VALUE *rb_ruby_debug_ptr(void);
4049__attribute__((__nonnull__ (1)))
4050__attribute__((__format__(__printf__, 1, 2)))
4051void rb_warning(const char *fmt, ...);
4052__attribute__((__nonnull__ (2)))
4053__attribute__((__format__(__printf__, 2, 3)))
4054void rb_category_warning(rb_warning_category_t cat, const char *fmt, ...);
4055__attribute__((__nonnull__ (1, 3)))
4056__attribute__((__format__(__printf__, 3, 4)))
4057void rb_compile_warning(const char *file, int line, const char *fmt, ...);
4058__attribute__((__nonnull__ (1)))
4059__attribute__((__format__(__printf__, 1, 2)))
4060void rb_sys_warning(const char *fmt, ...);
4061__attribute__((__cold__))
4062__attribute__((__nonnull__ (1)))
4063__attribute__((__format__(__printf__, 1, 2)))
4064void rb_warn(const char *fmt, ...);
4065__attribute__((__cold__))
4066__attribute__((__nonnull__ (2)))
4067__attribute__((__format__(__printf__, 2, 3)))
4068void rb_category_warn(rb_warning_category_t cat, const char *fmt, ...);
4069__attribute__((__nonnull__ (1, 3)))
4070__attribute__((__format__(__printf__, 3, 4)))
4071void rb_compile_warn(const char *file, int line, const char *fmt, ...);
4072__attribute__((__nonnull__ (2, 4)))
4073__attribute__((__format__(__printf__, 4, 5)))
4074void rb_category_compile_warn(rb_warning_category_t cat, const char *file, int line, const char *fmt, ...);
4075
4076
4077enum
4078
4079ruby_value_type {
4080 RUBY_T_NONE = 0x00,
4081 RUBY_T_OBJECT = 0x01,
4082 RUBY_T_CLASS = 0x02,
4083 RUBY_T_MODULE = 0x03,
4084 RUBY_T_FLOAT = 0x04,
4085 RUBY_T_STRING = 0x05,
4086 RUBY_T_REGEXP = 0x06,
4087 RUBY_T_ARRAY = 0x07,
4088 RUBY_T_HASH = 0x08,
4089 RUBY_T_STRUCT = 0x09,
4090 RUBY_T_BIGNUM = 0x0a,
4091 RUBY_T_FILE = 0x0b,
4092 RUBY_T_DATA = 0x0c,
4093 RUBY_T_MATCH = 0x0d,
4094 RUBY_T_COMPLEX = 0x0e,
4095 RUBY_T_RATIONAL = 0x0f,
4096 RUBY_T_NIL = 0x11,
4097 RUBY_T_TRUE = 0x12,
4098 RUBY_T_FALSE = 0x13,
4099 RUBY_T_SYMBOL = 0x14,
4100 RUBY_T_FIXNUM = 0x15,
4101 RUBY_T_UNDEF = 0x16,
4102 RUBY_T_IMEMO = 0x1a,
4103 RUBY_T_NODE = 0x1b,
4104 RUBY_T_ICLASS = 0x1c,
4105 RUBY_T_ZOMBIE = 0x1d,
4106 RUBY_T_MOVED = 0x1e,
4107 RUBY_T_MASK = 0x1f
4108};
4109
4110
4111__attribute__((__cold__))
4112void rb_check_type(VALUE obj, int t);
4113
4114
4115__attribute__((__pure__))
4116__attribute__((__artificial__))
4117static inline enum ruby_value_type
4118RB_BUILTIN_TYPE(VALUE obj)
4119{
4120 ((void)0);
4121 VALUE ret = ((struct RBasic *)(obj))->flags & RUBY_T_MASK;
4122 return ((enum ruby_value_type)ret);
4123}
4124__attribute__((__pure__))
4125static inline _Bool
4126rb_integer_type_p(VALUE obj)
4127{
4128 if (RB_FIXNUM_P(obj)) {
4129 return 1;
4130 }
4131 else if (RB_SPECIAL_CONST_P(obj)) {
4132 return 0;
4133 }
4134 else {
4135 return RB_BUILTIN_TYPE(obj) == RUBY_T_BIGNUM;
4136 }
4137}
4138__attribute__((__pure__))
4139static inline enum ruby_value_type
4140rb_type(VALUE obj)
4141{
4142 if (! RB_SPECIAL_CONST_P(obj)) {
4143 return RB_BUILTIN_TYPE(obj);
4144 }
4145 else if (obj == ((VALUE)RUBY_Qfalse)) {
4146 return RUBY_T_FALSE;
4147 }
4148 else if (obj == ((VALUE)RUBY_Qnil)) {
4149 return RUBY_T_NIL;
4150 }
4151 else if (obj == ((VALUE)RUBY_Qtrue)) {
4152 return RUBY_T_TRUE;
4153 }
4154 else if (obj == ((VALUE)RUBY_Qundef)) {
4155 return RUBY_T_UNDEF;
4156 }
4157 else if (RB_FIXNUM_P(obj)) {
4158 return RUBY_T_FIXNUM;
4159 }
4160 else if (RB_STATIC_SYM_P(obj)) {
4161 return RUBY_T_SYMBOL;
4162 }
4163 else {
4164 ((__builtin_expect(!!(!!(RB_FLONUM_P(obj))), 1)) ? ((void)0) : __builtin_unreachable());
4165 return RUBY_T_FLOAT;
4166 }
4167}
4168__attribute__((__pure__))
4169__attribute__((__artificial__))
4170static inline _Bool
4171RB_FLOAT_TYPE_P(VALUE obj)
4172{
4173 if (RB_FLONUM_P(obj)) {
4174 return 1;
4175 }
4176 else if (RB_SPECIAL_CONST_P(obj)) {
4177 return 0;
4178 }
4179 else {
4180 return RB_BUILTIN_TYPE(obj) == RUBY_T_FLOAT;
4181 }
4182}
4183__attribute__((__pure__))
4184__attribute__((__artificial__))
4185static inline _Bool
4186RB_DYNAMIC_SYM_P(VALUE obj)
4187{
4188 if (RB_SPECIAL_CONST_P(obj)) {
4189 return 0;
4190 }
4191 else {
4192 return RB_BUILTIN_TYPE(obj) == RUBY_T_SYMBOL;
4193 }
4194}
4195__attribute__((__pure__))
4196__attribute__((__artificial__))
4197static inline _Bool
4198RB_SYMBOL_P(VALUE obj)
4199{
4200 return RB_STATIC_SYM_P(obj) || RB_DYNAMIC_SYM_P(obj);
4201}
4202__attribute__((__pure__))
4203__attribute__((__artificial__))
4204__attribute__((__always_inline__)) inline
4205static _Bool
4206rbimpl_RB_TYPE_P_fastpath(VALUE obj, enum ruby_value_type t)
4207{
4208 if (t == RUBY_T_TRUE) {
4209 return obj == ((VALUE)RUBY_Qtrue);
4210 }
4211 else if (t == RUBY_T_FALSE) {
4212 return obj == ((VALUE)RUBY_Qfalse);
4213 }
4214 else if (t == RUBY_T_NIL) {
4215 return obj == ((VALUE)RUBY_Qnil);
4216 }
4217 else if (t == RUBY_T_UNDEF) {
4218 return obj == ((VALUE)RUBY_Qundef);
4219 }
4220 else if (t == RUBY_T_FIXNUM) {
4221 return RB_FIXNUM_P(obj);
4222 }
4223 else if (t == RUBY_T_SYMBOL) {
4224 return RB_SYMBOL_P(obj);
4225 }
4226 else if (t == RUBY_T_FLOAT) {
4227 return RB_FLOAT_TYPE_P(obj);
4228 }
4229 else if (RB_SPECIAL_CONST_P(obj)) {
4230 return 0;
4231 }
4232 else if (t == RB_BUILTIN_TYPE(obj)) {
4233 return 1;
4234 }
4235 else {
4236 return 0;
4237 }
4238}
4239__attribute__((__pure__))
4240__attribute__((__artificial__))
4241static inline _Bool
4242RB_TYPE_P(VALUE obj, enum ruby_value_type t)
4243{
4244 if (__builtin_constant_p(t)) {
4245 return rbimpl_RB_TYPE_P_fastpath(obj, t);
4246 }
4247 else {
4248 return t == rb_type(obj);
4249 }
4250}
4251__attribute__((__pure__))
4252__attribute__((__artificial__))
4253static inline _Bool rbimpl_rtypeddata_p(VALUE obj);
4254__attribute__((__artificial__))
4255static inline void
4256Check_Type(VALUE v, enum ruby_value_type t)
4257{
4258 if ((__builtin_expect(!!(! RB_TYPE_P(v, t)), 0))) {
4259 goto unexpected_type;
4260 }
4261 else if (t == RUBY_T_DATA && rbimpl_rtypeddata_p(v)) {
4262 goto unexpected_type;
4263 }
4264 else {
4265 return;
4266 }
4267 unexpected_type:
4268 rb_unexpected_type(v, t);
4269}
4270enum ruby_fl_ushift {
4271 RUBY_FL_USHIFT = 12
4272};
4273__extension__
4274enum
4275
4276ruby_fl_type {
4277 RUBY_FL_WB_PROTECTED = (1<<5),
4278 RUBY_FL_PROMOTED0 = (1<<5),
4279 RUBY_FL_PROMOTED1 = (1<<6),
4281 RUBY_FL_FINALIZE = (1<<7),
4283 __attribute__((__deprecated__ ("taintedness turned out to be a wrong idea.")))
4284 = (1<<8),
4285 RUBY_FL_SHAREABLE = (1<<8),
4287 __attribute__((__deprecated__ ("trustedness turned out to be a wrong idea.")))
4288 = (1<<8),
4289 RUBY_FL_SEEN_OBJ_ID = (1<<9),
4290 RUBY_FL_EXIVAR = (1<<10),
4291 RUBY_FL_FREEZE = (1<<11),
4292 RUBY_FL_USER0 = (1<<(RUBY_FL_USHIFT+0)),
4293 RUBY_FL_USER1 = (1<<(RUBY_FL_USHIFT+1)),
4294 RUBY_FL_USER2 = (1<<(RUBY_FL_USHIFT+2)),
4295 RUBY_FL_USER3 = (1<<(RUBY_FL_USHIFT+3)),
4296 RUBY_FL_USER4 = (1<<(RUBY_FL_USHIFT+4)),
4297 RUBY_FL_USER5 = (1<<(RUBY_FL_USHIFT+5)),
4298 RUBY_FL_USER6 = (1<<(RUBY_FL_USHIFT+6)),
4299 RUBY_FL_USER7 = (1<<(RUBY_FL_USHIFT+7)),
4300 RUBY_FL_USER8 = (1<<(RUBY_FL_USHIFT+8)),
4301 RUBY_FL_USER9 = (1<<(RUBY_FL_USHIFT+9)),
4302 RUBY_FL_USER10 = (1<<(RUBY_FL_USHIFT+10)),
4303 RUBY_FL_USER11 = (1<<(RUBY_FL_USHIFT+11)),
4304 RUBY_FL_USER12 = (1<<(RUBY_FL_USHIFT+12)),
4305 RUBY_FL_USER13 = (1<<(RUBY_FL_USHIFT+13)),
4306 RUBY_FL_USER14 = (1<<(RUBY_FL_USHIFT+14)),
4307 RUBY_FL_USER15 = (1<<(RUBY_FL_USHIFT+15)),
4308 RUBY_FL_USER16 = (1<<(RUBY_FL_USHIFT+16)),
4309 RUBY_FL_USER17 = (1<<(RUBY_FL_USHIFT+17)),
4310 RUBY_FL_USER18 = (1<<(RUBY_FL_USHIFT+18)),
4311 RUBY_FL_USER19 = (1<<(RUBY_FL_USHIFT+19)),
4314};
4315enum {
4317 __attribute__((__deprecated__ ("It seems there is no actual usage of this enum.")))
4318 = (int)RUBY_T_MASK | (int)RUBY_FL_EXIVAR
4319};
4320
4321
4322void rb_freeze_singleton_class(VALUE klass);
4323
4324
4325__attribute__((__pure__))
4326__attribute__((__artificial__))
4327__attribute__((__always_inline__)) inline
4328static _Bool
4329RB_FL_ABLE(VALUE obj)
4330{
4331 if (RB_SPECIAL_CONST_P(obj)) {
4332 return 0;
4333 }
4334 else if (RB_TYPE_P(obj, RUBY_T_NODE)) {
4335 return 0;
4336 }
4337 else {
4338 return 1;
4339 }
4340}
4341__attribute__((__pure__))
4342__attribute__((__artificial__))
4343static inline VALUE
4344RB_FL_TEST_RAW(VALUE obj, VALUE flags)
4345{
4346 ((void)0);
4347 return ((struct RBasic *)(obj))->flags & flags;
4348}
4349__attribute__((__pure__))
4350__attribute__((__artificial__))
4351static inline VALUE
4352RB_FL_TEST(VALUE obj, VALUE flags)
4353{
4354 if (RB_FL_ABLE(obj)) {
4355 return RB_FL_TEST_RAW(obj, flags);
4356 }
4357 else {
4358 return 0UL;
4359 }
4360}
4361__attribute__((__pure__))
4362__attribute__((__artificial__))
4363static inline _Bool
4364RB_FL_ANY_RAW(VALUE obj, VALUE flags)
4365{
4366 return RB_FL_TEST_RAW(obj, flags);
4367}
4368__attribute__((__pure__))
4369__attribute__((__artificial__))
4370static inline _Bool
4371RB_FL_ANY(VALUE obj, VALUE flags)
4372{
4373 return RB_FL_TEST(obj, flags);
4374}
4375__attribute__((__pure__))
4376__attribute__((__artificial__))
4377static inline _Bool
4378RB_FL_ALL_RAW(VALUE obj, VALUE flags)
4379{
4380 return RB_FL_TEST_RAW(obj, flags) == flags;
4381}
4382__attribute__((__pure__))
4383__attribute__((__artificial__))
4384static inline _Bool
4385RB_FL_ALL(VALUE obj, VALUE flags)
4386{
4387 return RB_FL_TEST(obj, flags) == flags;
4388}
4389
4390__attribute__((__artificial__))
4391static inline void
4392rbimpl_fl_set_raw_raw(struct RBasic *obj, VALUE flags)
4393{
4394 obj->flags |= flags;
4395}
4396__attribute__((__artificial__))
4397static inline void
4398RB_FL_SET_RAW(VALUE obj, VALUE flags)
4399{
4400 ((void)0);
4401 rbimpl_fl_set_raw_raw(((struct RBasic *)(obj)), flags);
4402}
4403__attribute__((__artificial__))
4404static inline void
4405RB_FL_SET(VALUE obj, VALUE flags)
4406{
4407 if (RB_FL_ABLE(obj)) {
4408 RB_FL_SET_RAW(obj, flags);
4409 }
4410}
4411
4412__attribute__((__artificial__))
4413static inline void
4414rbimpl_fl_unset_raw_raw(struct RBasic *obj, VALUE flags)
4415{
4416 obj->flags &= ~flags;
4417}
4418__attribute__((__artificial__))
4419static inline void
4420RB_FL_UNSET_RAW(VALUE obj, VALUE flags)
4421{
4422 ((void)0);
4423 rbimpl_fl_unset_raw_raw(((struct RBasic *)(obj)), flags);
4424}
4425__attribute__((__artificial__))
4426static inline void
4427RB_FL_UNSET(VALUE obj, VALUE flags)
4428{
4429 if (RB_FL_ABLE(obj)) {
4430 RB_FL_UNSET_RAW(obj, flags);
4431 }
4432}
4433
4434__attribute__((__artificial__))
4435static inline void
4436rbimpl_fl_reverse_raw_raw(struct RBasic *obj, VALUE flags)
4437{
4438 obj->flags ^= flags;
4439}
4440__attribute__((__artificial__))
4441static inline void
4442RB_FL_REVERSE_RAW(VALUE obj, VALUE flags)
4443{
4444 ((void)0);
4445 rbimpl_fl_reverse_raw_raw(((struct RBasic *)(obj)), flags);
4446}
4447__attribute__((__artificial__))
4448static inline void
4449RB_FL_REVERSE(VALUE obj, VALUE flags)
4450{
4451 if (RB_FL_ABLE(obj)) {
4453 }
4454}
4455__attribute__((__pure__))
4456__attribute__((__artificial__))
4457__attribute__((__deprecated__ ("taintedness turned out to be a wrong idea.")))
4458static inline _Bool
4459RB_OBJ_TAINTABLE(VALUE obj)
4460{
4461 return 0;
4462}
4463__attribute__((__pure__))
4464__attribute__((__artificial__))
4465__attribute__((__deprecated__ ("taintedness turned out to be a wrong idea.")))
4466static inline VALUE
4467RB_OBJ_TAINTED_RAW(VALUE obj)
4468{
4469 return 0;
4470}
4471__attribute__((__pure__))
4472__attribute__((__artificial__))
4473__attribute__((__deprecated__ ("taintedness turned out to be a wrong idea.")))
4474static inline _Bool
4475RB_OBJ_TAINTED(VALUE obj)
4476{
4477 return 0;
4478}
4479__attribute__((__artificial__))
4480__attribute__((__deprecated__ ("taintedness turned out to be a wrong idea.")))
4481static inline void
4482RB_OBJ_TAINT_RAW(VALUE obj)
4483{
4484 return;
4485}
4486__attribute__((__artificial__))
4487__attribute__((__deprecated__ ("taintedness turned out to be a wrong idea.")))
4488static inline void
4489RB_OBJ_TAINT(VALUE obj)
4490{
4491 return;
4492}
4493__attribute__((__artificial__))
4494__attribute__((__deprecated__ ("taintedness turned out to be a wrong idea.")))
4495static inline void
4496RB_OBJ_INFECT_RAW(VALUE dst, VALUE src)
4497{
4498 return;
4499}
4500__attribute__((__artificial__))
4501__attribute__((__deprecated__ ("taintedness turned out to be a wrong idea.")))
4502static inline void
4503RB_OBJ_INFECT(VALUE dst, VALUE src)
4504{
4505 return;
4506}
4507__attribute__((__pure__))
4508__attribute__((__artificial__))
4509static inline VALUE
4510RB_OBJ_FROZEN_RAW(VALUE obj)
4511{
4512 return RB_FL_TEST_RAW(obj, RUBY_FL_FREEZE);
4513}
4514__attribute__((__pure__))
4515__attribute__((__artificial__))
4516static inline _Bool
4517RB_OBJ_FROZEN(VALUE obj)
4518{
4519 if (! RB_FL_ABLE(obj)) {
4520 return 1;
4521 }
4522 else {
4523 return RB_OBJ_FROZEN_RAW(obj);
4524 }
4525}
4526__attribute__((__artificial__))
4527static inline void
4528RB_OBJ_FREEZE_RAW(VALUE obj)
4529{
4531}
4532static inline void
4533rb_obj_freeze_inline(VALUE x)
4534{
4535 if (RB_FL_ABLE(x)) {
4537 if (RBASIC_CLASS(x) && !(((struct RBasic *)(x))->flags & RUBY_FL_SINGLETON)) {
4538 rb_freeze_singleton_class(x);
4539 }
4540 }
4541}
4542enum ruby_rstring_flags {
4543 RSTRING_NOEMBED = RUBY_FL_USER1,
4544 RSTRING_FSTR = RUBY_FL_USER17
4545};
4546struct RString {
4547 struct RBasic basic;
4548 union {
4549 struct {
4550 long len;
4551 char *ptr;
4552 union {
4553 long capa;
4554 VALUE shared;
4555 } aux;
4556 } heap;
4557 struct {
4558 long len;
4559 char ary[1];
4560 } embed;
4561 } as;
4562};
4563
4564
4565VALUE rb_str_to_str(VALUE obj);
4566VALUE rb_string_value(volatile VALUE *ptr);
4567char *rb_string_value_ptr(volatile VALUE *ptr);
4568char *rb_string_value_cstr(volatile VALUE *ptr);
4569VALUE rb_str_export(VALUE obj);
4570VALUE rb_str_export_locale(VALUE obj);
4571__attribute__((__error__ ("rb_check_safe_str() and Check_SafeStr() are obsolete; use StringValue() instead")))
4572void rb_check_safe_str(VALUE);
4573void rb_debug_rstring_null_ptr(const char *func);
4574
4575
4576__attribute__((__pure__))
4577__attribute__((__artificial__))
4578static inline long
4579RSTRING_EMBED_LEN(VALUE str)
4580{
4581 ((void)0);
4582 ((void)0);
4583 long f = ((struct RString *)(str))->as.embed.len;
4584 return f;
4585}
4586
4587
4588__attribute__((__pure__))
4589__attribute__((__artificial__))
4590static inline struct RString
4591rbimpl_rstring_getmem(VALUE str)
4592{
4593 ((void)0);
4594 if (RB_FL_ANY_RAW(str, RSTRING_NOEMBED)) {
4595 return *((struct RString *)(str));
4596 }
4597 else {
4598 struct RString retval;
4599 retval.as.heap.len = RSTRING_EMBED_LEN(str);
4600 retval.as.heap.ptr = ((struct RString *)(str))->as.embed.ary;
4601 return retval;
4602 }
4603}
4604
4605
4606__attribute__((__pure__))
4607__attribute__((__artificial__))
4608static inline long
4609RSTRING_LEN(VALUE str)
4610{
4611 return rbimpl_rstring_getmem(str).as.heap.len;
4612}
4613__attribute__((__artificial__))
4614static inline char *
4615RSTRING_PTR(VALUE str)
4616{
4617 char *ptr = rbimpl_rstring_getmem(str).as.heap.ptr;
4618 if ((__builtin_expect(!!(! ptr), 0))) {
4619 rb_debug_rstring_null_ptr("RSTRING_PTR");
4620 }
4621 return ptr;
4622}
4623__attribute__((__artificial__))
4624static inline char *
4625RSTRING_END(VALUE str)
4626{
4627 struct RString buf = rbimpl_rstring_getmem(str);
4628 if ((__builtin_expect(!!(! buf.as.heap.ptr), 0))) {
4629 rb_debug_rstring_null_ptr("RSTRING_END");
4630 }
4631 return &buf.as.heap.ptr[buf.as.heap.len];
4632}
4633__attribute__((__artificial__))
4634static inline int
4635RSTRING_LENINT(VALUE str)
4636{
4637 return rb_long2int_inline(RSTRING_LEN(str));
4638}
4639__attribute__((__const__))
4640
4641__attribute__((__artificial__))
4642static inline VALUE
4643RB_CHR2FIX(unsigned char c)
4644{
4645 return RB_INT2FIX(c);
4646}
4647static inline char
4648rb_num2char_inline(VALUE x)
4649{
4650 if (RB_TYPE_P(x, RUBY_T_STRING) && (RSTRING_LEN(x)>=1))
4651 return RSTRING_PTR(x)[0];
4652 else
4653 return ((char)rb_num2int_inline(x));
4654}
4655
4656
4657double rb_num2dbl(VALUE num);
4658__attribute__((__pure__))
4659double rb_float_value(VALUE num);
4660VALUE rb_float_new(double d);
4661VALUE rb_float_new_in_heap(double d);
4662
4663
4664
4665
4666VALUE rb_ll2inum(long long num);
4667VALUE rb_ull2inum(unsigned long long num);
4668long long rb_num2ll(VALUE num);
4669unsigned long long rb_num2ull(VALUE num);
4670
4671
4672static inline VALUE
4673rb_ll2num_inline(long long n)
4674{
4675 if ((((n) < (0x7fffffffffffffffL / 2) + 1) && ((n) >= ((-0x7fffffffffffffffL - 1L) / 2)))) return RB_INT2FIX((long)n);
4676 return rb_ll2inum(n);
4677}
4678static inline VALUE
4679rb_ull2num_inline(unsigned long long n)
4680{
4681 if (((n) < (0x7fffffffffffffffL / 2) + 1)) return RB_INT2FIX((long)n);
4682 return rb_ull2inum(n);
4683}
4684static inline long long
4685rb_num2ll_inline(VALUE x)
4686{
4687 if (RB_FIXNUM_P(x))
4688 return rb_fix2long(x);
4689 else
4690 return rb_num2ll(x);
4691}
4692static inline unsigned long long
4693rb_num2ull_inline(VALUE x)
4694{
4695 if (RB_FIXNUM_P(x))
4696 return rb_fix2long(x);
4697 else
4698 return rb_num2ull(x);
4699}
4700
4701
4702short rb_num2short(VALUE num);
4703unsigned short rb_num2ushort(VALUE num);
4704short rb_fix2short(VALUE num);
4705unsigned short rb_fix2ushort(VALUE num);
4706
4707
4708static inline short
4709rb_num2short_inline(VALUE x)
4710{
4711 if (RB_FIXNUM_P(x))
4712 return rb_fix2short(x);
4713 else
4714 return rb_num2short(x);
4715}
4716
4717
4718typedef unsigned long st_data_t;
4719typedef struct st_table st_table;
4720typedef st_data_t st_index_t;
4721typedef int st_compare_func(st_data_t, st_data_t);
4722typedef st_index_t st_hash_func(st_data_t);
4723typedef char st_check_for_sizeof_st_index_t[8 == (int)sizeof(st_index_t) ? 1 : -1];
4724struct st_hash_type {
4725 int (*compare)(st_data_t, st_data_t);
4726 st_index_t (*hash)(st_data_t);
4727};
4728typedef struct st_table_entry st_table_entry;
4729struct st_table_entry;
4730struct st_table {
4731 unsigned char entry_power, bin_power, size_ind;
4732 unsigned int rebuilds_num;
4733 const struct st_hash_type *type;
4734 st_index_t num_entries;
4735 st_index_t *bins;
4736 st_index_t entries_start, entries_bound;
4737 st_table_entry *entries;
4738};
4739enum st_retval {ST_CONTINUE, ST_STOP, ST_DELETE, ST_CHECK, ST_REPLACE};
4740st_table *rb_st_init_table(const struct st_hash_type *);
4741st_table *rb_st_init_table_with_size(const struct st_hash_type *, st_index_t);
4742st_table *rb_st_init_numtable(void);
4743st_table *rb_st_init_numtable_with_size(st_index_t);
4744st_table *rb_st_init_strtable(void);
4745st_table *rb_st_init_strtable_with_size(st_index_t);
4746st_table *rb_st_init_strcasetable(void);
4747st_table *rb_st_init_strcasetable_with_size(st_index_t);
4748int rb_st_delete(st_table *, st_data_t *, st_data_t *);
4749int rb_st_delete_safe(st_table *, st_data_t *, st_data_t *, st_data_t);
4750int rb_st_shift(st_table *, st_data_t *, st_data_t *);
4751int rb_st_insert(st_table *, st_data_t, st_data_t);
4752int rb_st_insert2(st_table *, st_data_t, st_data_t, st_data_t (*)(st_data_t));
4753int rb_st_lookup(st_table *, st_data_t, st_data_t *);
4754int rb_st_get_key(st_table *, st_data_t, st_data_t *);
4755typedef int st_update_callback_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing);
4756int rb_st_update(st_table *table, st_data_t key, st_update_callback_func *func, st_data_t arg);
4757typedef int st_foreach_callback_func(st_data_t, st_data_t, st_data_t);
4758typedef int st_foreach_check_callback_func(st_data_t, st_data_t, st_data_t, int);
4759int rb_st_foreach_with_replace(st_table *tab, st_foreach_check_callback_func *func, st_update_callback_func *replace, st_data_t arg);
4760int rb_st_foreach(st_table *, st_foreach_callback_func *, st_data_t);
4761int rb_st_foreach_check(st_table *, st_foreach_check_callback_func *, st_data_t, st_data_t);
4762st_index_t rb_st_keys(st_table *table, st_data_t *keys, st_index_t size);
4763st_index_t rb_st_keys_check(st_table *table, st_data_t *keys, st_index_t size, st_data_t never);
4764st_index_t rb_st_values(st_table *table, st_data_t *values, st_index_t size);
4765st_index_t rb_st_values_check(st_table *table, st_data_t *values, st_index_t size, st_data_t never);
4766void rb_st_add_direct(st_table *, st_data_t, st_data_t);
4767void rb_st_free_table(st_table *);
4768void rb_st_cleanup_safe(st_table *, st_data_t);
4769void rb_st_clear(st_table *);
4770st_table *rb_st_copy(st_table *);
4771__attribute__((__const__)) int rb_st_numcmp(st_data_t, st_data_t);
4772__attribute__((__const__)) st_index_t rb_st_numhash(st_data_t);
4773__attribute__((__pure__)) int rb_st_locale_insensitive_strcasecmp(const char *s1, const char *s2);
4774__attribute__((__pure__)) int rb_st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n);
4775__attribute__((__pure__)) size_t rb_st_memsize(const st_table *);
4776__attribute__((__pure__)) st_index_t rb_st_hash(const void *ptr, size_t len, st_index_t h);
4777__attribute__((__const__)) st_index_t rb_st_hash_uint32(st_index_t h, uint32_t i);
4778__attribute__((__const__)) st_index_t rb_st_hash_uint(st_index_t h, st_index_t i);
4779__attribute__((__const__)) st_index_t rb_st_hash_end(st_index_t h);
4780__attribute__((__const__)) st_index_t rb_st_hash_start(st_index_t h);
4781void rb_hash_bulk_insert_into_st_table(long, const VALUE *, VALUE);
4782
4783
4784__attribute__((__const__))
4785
4786__attribute__((__artificial__))
4787static inline VALUE
4788RB_ST2FIX(st_data_t i)
4789{
4790 long x = i;
4791 if (x >= 0) {
4792 x &= (0x7fffffffffffffffL / 2);
4793 }
4794 else {
4795 x |= ((-0x7fffffffffffffffL - 1L) / 2);
4796 }
4797 ((void)0);
4798 unsigned long y = ((unsigned long)x);
4799 return RB_INT2FIX(y);
4800}
4801
4802
4803void rb_gc_writebarrier(VALUE old, VALUE young);
4804void rb_gc_writebarrier_unprotect(VALUE obj);
4805
4806
4807__attribute__((__pure__))
4808__attribute__((__artificial__))
4809static inline _Bool
4810RB_OBJ_PROMOTED_RAW(VALUE obj)
4811{
4812 ((void)0);
4813 return RB_FL_ANY_RAW(obj, RUBY_FL_PROMOTED);
4814}
4815__attribute__((__pure__))
4816__attribute__((__artificial__))
4817static inline _Bool
4818RB_OBJ_PROMOTED(VALUE obj)
4819{
4820 if (! RB_FL_ABLE(obj)) {
4821 return 0;
4822 }
4823 else {
4824 return RB_OBJ_PROMOTED_RAW(obj);
4825 }
4826}
4827static inline VALUE
4829 VALUE x,
4830 [[maybe_unused]]
4831 const char *filename,
4832 [[maybe_unused]]
4833 int line)
4834{
4836 return x;
4837}
4838static inline VALUE
4839rb_obj_written(
4840 VALUE a,
4841 [[maybe_unused]]
4842 VALUE oldv,
4843 VALUE b,
4844 [[maybe_unused]]
4845 const char *filename,
4846 [[maybe_unused]]
4847 int line)
4848{
4849 if (!RB_SPECIAL_CONST_P(b)) {
4850 rb_gc_writebarrier(a, b);
4851 }
4852 return a;
4853}
4854static inline VALUE
4855rb_obj_write(
4856 VALUE a, VALUE *slot, VALUE b,
4857 [[maybe_unused]]
4858 const char *filename,
4859 [[maybe_unused]]
4860 int line)
4861{
4862 *slot = b;
4863 rb_obj_written(a, ((VALUE)RUBY_Qundef) , b, filename, line);
4864 return a;
4865}
4866enum ruby_rarray_flags {
4867 RARRAY_EMBED_FLAG = RUBY_FL_USER1,
4868 RARRAY_EMBED_LEN_MASK = RUBY_FL_USER9 | RUBY_FL_USER8 | RUBY_FL_USER7 | RUBY_FL_USER6 |
4870 ,
4871 RARRAY_TRANSIENT_FLAG = RUBY_FL_USER13
4872};
4873enum ruby_rarray_consts {
4875};
4876struct RArray {
4877 struct RBasic basic;
4878 union {
4879 struct {
4880 long len;
4881 union {
4882 long capa;
4883 const
4884 VALUE shared_root;
4885 } aux;
4886 const VALUE *ptr;
4887 } heap;
4888 const VALUE ary[1];
4889 } as;
4890};
4891
4892
4893VALUE *rb_ary_ptr_use_start(VALUE ary);
4894void rb_ary_ptr_use_end(VALUE a);
4895void rb_ary_detransient(VALUE a);
4896
4897
4898__attribute__((__pure__))
4899__attribute__((__artificial__))
4900static inline long
4901RARRAY_EMBED_LEN(VALUE ary)
4902{
4903 ((void)0);
4904 ((void)0);
4905 VALUE f = ((struct RBasic *)(ary))->flags;
4906 f &= RARRAY_EMBED_LEN_MASK;
4908 return ((long)f);
4909}
4910__attribute__((__pure__))
4911static inline long
4912rb_array_len(VALUE a)
4913{
4914 ((void)0);
4915 if (RB_FL_ANY_RAW(a, RARRAY_EMBED_FLAG)) {
4916 return RARRAY_EMBED_LEN(a);
4917 }
4918 else {
4919 return ((struct RArray *)(a))->as.heap.len;
4920 }
4921}
4922__attribute__((__artificial__))
4923static inline int
4924RARRAY_LENINT(VALUE ary)
4925{
4926 return rb_long2int_inline(rb_array_len(ary));
4927}
4928__attribute__((__pure__))
4929__attribute__((__artificial__))
4930static inline _Bool
4931RARRAY_TRANSIENT_P(VALUE ary)
4932{
4933 ((void)0);
4934 return RB_FL_ANY_RAW(ary, RARRAY_TRANSIENT_FLAG);
4935}
4936__attribute__((__pure__))
4937static inline const VALUE *
4938rb_array_const_ptr_transient(VALUE a)
4939{
4940 ((void)0);
4941 if (RB_FL_ANY_RAW(a, RARRAY_EMBED_FLAG)) {
4942 return (((struct RArray *)(a))->as.ary);
4943 }
4944 else {
4945 return (((struct RArray *)(a))->as.heap.ptr);
4946 }
4947}
4948static inline const VALUE *
4949rb_array_const_ptr(VALUE a)
4950{
4951 ((void)0);
4952 if (RARRAY_TRANSIENT_P(a)) {
4954 }
4955 return rb_array_const_ptr_transient(a);
4956}
4957static inline VALUE *
4958rb_array_ptr_use_start(VALUE a,
4959 [[maybe_unused]]
4960 int allow_transient)
4961{
4962 ((void)0);
4963 if (!allow_transient) {
4964 if (RARRAY_TRANSIENT_P(a)) {
4966 }
4967 }
4968 return rb_ary_ptr_use_start(a);
4969}
4970static inline void
4971rb_array_ptr_use_end(VALUE a,
4972 [[maybe_unused]]
4973 int allow_transient)
4974{
4975 ((void)0);
4976 rb_ary_ptr_use_end(a);
4977}
4978static inline VALUE *
4979RARRAY_PTR(VALUE ary)
4980{
4981 ((void)0);
4982 VALUE tmp = (1 ? rb_obj_wb_unprotect(ary, "./include/ruby/internal/core/rarray.h", 574) : ary);
4983 return ((VALUE *)rb_array_const_ptr(tmp));
4984}
4985static inline void
4986RARRAY_ASET(VALUE ary, long i, VALUE v)
4987{
4988 do { ((void)0); const VALUE rbimpl_ary = (ary); VALUE *ptr = rb_array_ptr_use_start(rbimpl_ary, (1)); (rb_obj_write((VALUE)(ary), (VALUE *)(&ptr[i]), (VALUE)(v), "./include/ruby/internal/core/rarray.h", 593)); rb_array_ptr_use_end(rbimpl_ary, (1)); } while (0);
4989}
4990
4991
4992int rb_big_sign(VALUE num);
4993
4994
4995static inline _Bool
4996RBIGNUM_POSITIVE_P(VALUE b)
4997{
4998 ((void)0);
4999 return rb_big_sign(b);
5000}
5001static inline _Bool
5002RBIGNUM_NEGATIVE_P(VALUE b)
5003{
5004 ((void)0);
5005 return ! RBIGNUM_POSITIVE_P(b);
5006}
5007enum ruby_rmodule_flags {
5008 RMODULE_IS_REFINEMENT = RUBY_FL_USER3
5009};
5010struct RClass;
5011
5012
5013VALUE rb_class_get_superclass(VALUE klass);
5014
5015
5016typedef void (*RUBY_DATA_FUNC)(void*);
5017struct RData {
5018 struct RBasic basic;
5021 void *data;
5022};
5023
5024
5025VALUE rb_data_object_wrap(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree);
5026VALUE rb_data_object_zalloc(VALUE klass, size_t size, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree);
5027extern VALUE rb_cObject;
5028
5029
5030__attribute__((__warning__ ("untyped Data is unsafe; use TypedData instead"))) __attribute__((__deprecated__ ("by TypedData")))
5031static inline VALUE
5032rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
5033{
5034 return rb_data_object_wrap(klass, ptr, mark, free);
5035}
5036static inline void *
5037rb_data_object_get(VALUE obj)
5038{
5039 Check_Type(obj, RUBY_T_DATA);
5040 return ((struct RData *)(obj))->data;
5041}
5042__attribute__((__warning__ ("untyped Data is unsafe; use TypedData instead"))) __attribute__((__deprecated__ ("by TypedData")))
5043static inline void *
5044rb_data_object_get_warning(VALUE obj)
5045{
5046 return rb_data_object_get(obj);
5047}
5048static inline VALUE
5049rb_data_object_make(VALUE klass, RUBY_DATA_FUNC mark_func, RUBY_DATA_FUNC free_func, void **datap, size_t size)
5050{
5051 VALUE result = rb_data_object_zalloc( (klass), (size), ((void (*)(void *))(mark_func)), ((void (*)(void *))(free_func))); (*datap) = ((void *)((struct RData *)(result))->data); ((void)(*datap));
5052 return result;
5053}
5054__attribute__((__deprecated__ ("by: rb_data_object_wrap")))
5055static inline VALUE
5056rb_data_object_alloc(VALUE klass, void *data, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
5057{
5058 return rb_data_object_wrap(klass, data, dmark, dfree);
5059}
5060struct rb_io_t;
5061struct RFile {
5062 struct RBasic basic;
5063 struct rb_io_t *fptr;
5064};
5065struct st_table;
5066
5067
5068size_t rb_hash_size_num(VALUE hash);
5069struct st_table *rb_hash_tbl(VALUE hash, const char *file, int line);
5070VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone);
5071
5072
5073enum ruby_robject_flags {
5074 ROBJECT_EMBED = RUBY_FL_USER1
5075};
5076enum ruby_robject_consts {
5077 ROBJECT_EMBED_LEN_MAX = ((int)(sizeof(VALUE[3]) / (sizeof(VALUE))))
5078};
5079struct st_table;
5080struct RObject {
5081 struct RBasic basic;
5082 union {
5083 struct {
5084 uint32_t numiv;
5085 VALUE *ivptr;
5086 struct st_table *iv_index_tbl;
5087 } heap;
5089 } as;
5090};
5091__attribute__((__pure__))
5092__attribute__((__artificial__))
5093static inline uint32_t
5094ROBJECT_NUMIV(VALUE obj)
5095{
5096 ((void)0);
5097 if (RB_FL_ANY_RAW(obj, ROBJECT_EMBED)) {
5098 return ROBJECT_EMBED_LEN_MAX;
5099 }
5100 else {
5101 return ((struct RObject *)(obj))->as.heap.numiv;
5102 }
5103}
5104__attribute__((__pure__))
5105__attribute__((__artificial__))
5106static inline VALUE *
5107ROBJECT_IVPTR(VALUE obj)
5108{
5109 ((void)0);
5110 struct RObject *const ptr = ((struct RObject *)(obj));
5111 if (RB_FL_ANY_RAW(obj, ROBJECT_EMBED)) {
5112 return ptr->as.ary;
5113 }
5114 else {
5115 return ptr->as.heap.ivptr;
5116 }
5117}
5118struct re_patter_buffer;
5119struct RRegexp {
5120 struct RBasic basic;
5121 struct re_pattern_buffer *ptr;
5122 const VALUE src;
5123 unsigned long usecnt;
5124};
5125__attribute__((__pure__))
5126__attribute__((__artificial__))
5127static inline VALUE
5128RREGEXP_SRC(VALUE rexp)
5129{
5130 ((void)0);
5131 VALUE ret = ((struct RRegexp *)(rexp))->src;
5132 ((void)0);
5133 return ret;
5134}
5135__attribute__((__pure__))
5136__attribute__((__artificial__))
5137static inline char *
5138RREGEXP_SRC_PTR(VALUE rexp)
5139{
5140 return RSTRING_PTR(RREGEXP_SRC(rexp));
5141}
5142__attribute__((__pure__))
5143__attribute__((__artificial__))
5144static inline long
5145RREGEXP_SRC_LEN(VALUE rexp)
5146{
5147 return RSTRING_LEN(RREGEXP_SRC(rexp));
5148}
5149__attribute__((__pure__))
5150__attribute__((__artificial__))
5151static inline char *
5152RREGEXP_SRC_END(VALUE rexp)
5153{
5154 return RSTRING_END(RREGEXP_SRC(rexp));
5155}
5156
5157
5158VALUE rb_struct_size(VALUE st);
5159VALUE rb_struct_aref(VALUE st, VALUE k);
5160VALUE rb_struct_aset(VALUE st, VALUE k, VALUE v);
5161
5162
5163__attribute__((__artificial__))
5164static inline long
5165RSTRUCT_LEN(VALUE st)
5166{
5167 ((void)0);
5169}
5170__attribute__((__artificial__))
5171static inline VALUE
5172RSTRUCT_SET(VALUE st, int k, VALUE v)
5173{
5174 ((void)0);
5175 return rb_struct_aset(st, rb_int2num_inline(k), (v));
5176}
5177__attribute__((__artificial__))
5178static inline VALUE
5179RSTRUCT_GET(VALUE st, int k)
5180{
5181 ((void)0);
5182 return rb_struct_aref(st, rb_int2num_inline(k));
5183}
5184enum
5185
5186rbimpl_typeddata_flags {
5187 RUBY_TYPED_FREE_IMMEDIATELY = 1,
5188 RUBY_TYPED_FROZEN_SHAREABLE = RUBY_FL_SHAREABLE,
5189 RUBY_TYPED_WB_PROTECTED = RUBY_FL_WB_PROTECTED,
5190 RUBY_TYPED_PROMOTED1 = RUBY_FL_PROMOTED1
5191};
5192typedef struct rb_data_type_struct rb_data_type_t;
5193struct rb_data_type_struct {
5194 const char *wrap_struct_name;
5195 struct {
5198 size_t (*dsize)(const void *);
5200 void *reserved[1];
5201 } function;
5202 const rb_data_type_t *parent;
5203 void *data;
5204 VALUE flags;
5205};
5206struct RTypedData {
5207 struct RBasic basic;
5208 const rb_data_type_t *type;
5209 VALUE typed_flag;
5210 void *data;
5211};
5212
5213
5214__attribute__((__nonnull__ (3)))
5215VALUE rb_data_typed_object_wrap(VALUE klass, void *datap, const rb_data_type_t *type);
5216VALUE rb_data_typed_object_zalloc(VALUE klass, size_t size, const rb_data_type_t *type);
5217int rb_typeddata_inherited_p(const rb_data_type_t *child, const rb_data_type_t *parent);
5218int rb_typeddata_is_kind_of(VALUE obj, const rb_data_type_t *data_type);
5219void *rb_check_typeddata(VALUE obj, const rb_data_type_t *data_type);
5220
5221
5222__attribute__((__pure__))
5223__attribute__((__artificial__))
5224static inline _Bool
5225rbimpl_rtypeddata_p(VALUE obj)
5226{
5227 return ((struct RTypedData *)(obj))->typed_flag == 1;
5228}
5229__attribute__((__pure__))
5230__attribute__((__artificial__))
5231static inline _Bool
5232RTYPEDDATA_P(VALUE obj)
5233{
5234 return rbimpl_rtypeddata_p(obj);
5235}
5236__attribute__((__pure__))
5237__attribute__((__artificial__))
5238static inline const struct rb_data_type_struct *
5239RTYPEDDATA_TYPE(VALUE obj)
5240{
5241 return ((struct RTypedData *)(obj))->type;
5242}
5243static inline VALUE
5244rb_data_typed_object_make(VALUE klass, const rb_data_type_t *type, void **datap, size_t size)
5245{
5246 VALUE result = rb_data_typed_object_zalloc(klass, size, type); (*datap) = ((void *)(((struct RTypedData *)(result))->data)); ((void)(*datap));
5247 return result;
5248}
5249__attribute__((__deprecated__ ("by: rb_data_typed_object_wrap")))
5250static inline VALUE
5251rb_data_typed_object_alloc(VALUE klass, void *datap, const rb_data_type_t *type)
5252{
5253 return rb_data_typed_object_wrap(klass, datap, type);
5254}
5255
5256enum
5257{
5258 _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)),
5259 _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)),
5260 _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)),
5261 _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)),
5262 _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)),
5263 _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)),
5264 _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)),
5265 _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)),
5266 _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)),
5267 _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)),
5268 _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)),
5269 _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8))
5270};
5271extern const unsigned short int **__ctype_b_loc (void)
5272 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
5273extern const __int32_t **__ctype_tolower_loc (void)
5274 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
5275extern const __int32_t **__ctype_toupper_loc (void)
5276 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
5277extern int isalnum (int) __attribute__ ((__nothrow__ , __leaf__));
5278extern int isalpha (int) __attribute__ ((__nothrow__ , __leaf__));
5279extern int iscntrl (int) __attribute__ ((__nothrow__ , __leaf__));
5280extern int isdigit (int) __attribute__ ((__nothrow__ , __leaf__));
5281extern int islower (int) __attribute__ ((__nothrow__ , __leaf__));
5282extern int isgraph (int) __attribute__ ((__nothrow__ , __leaf__));
5283extern int isprint (int) __attribute__ ((__nothrow__ , __leaf__));
5284extern int ispunct (int) __attribute__ ((__nothrow__ , __leaf__));
5285extern int isspace (int) __attribute__ ((__nothrow__ , __leaf__));
5286extern int isupper (int) __attribute__ ((__nothrow__ , __leaf__));
5287extern int isxdigit (int) __attribute__ ((__nothrow__ , __leaf__));
5288extern int tolower (int __c) __attribute__ ((__nothrow__ , __leaf__));
5289extern int toupper (int __c) __attribute__ ((__nothrow__ , __leaf__));
5290extern int isblank (int) __attribute__ ((__nothrow__ , __leaf__));
5291extern int isctype (int __c, int __mask) __attribute__ ((__nothrow__ , __leaf__));
5292extern int isascii (int __c) __attribute__ ((__nothrow__ , __leaf__));
5293extern int toascii (int __c) __attribute__ ((__nothrow__ , __leaf__));
5294extern int _toupper (int) __attribute__ ((__nothrow__ , __leaf__));
5295extern int _tolower (int) __attribute__ ((__nothrow__ , __leaf__));
5296extern __inline __attribute__ ((__gnu_inline__)) int
5297__attribute__ ((__nothrow__ , __leaf__)) tolower (int __c)
5298{
5299 return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c;
5300}
5301extern __inline __attribute__ ((__gnu_inline__)) int
5302__attribute__ ((__nothrow__ , __leaf__)) toupper (int __c)
5303{
5304 return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c;
5305}
5306extern int isalnum_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5307extern int isalpha_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5308extern int iscntrl_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5309extern int isdigit_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5310extern int islower_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5311extern int isgraph_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5312extern int isprint_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5313extern int ispunct_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5314extern int isspace_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5315extern int isupper_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5316extern int isxdigit_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5317extern int isblank_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
5318extern int __tolower_l (int __c, locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
5319extern int tolower_l (int __c, locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
5320extern int __toupper_l (int __c, locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
5321extern int toupper_l (int __c, locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
5322
5323
5324
5325__attribute__((__nonnull__ ()))
5326int rb_st_locale_insensitive_strcasecmp(const char *s1, const char *s2);
5327__attribute__((__nonnull__ ()))
5328int rb_st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n);
5329__attribute__((__nonnull__ (1)))
5330unsigned long ruby_strtoul(const char *str, char **endptr, int base);
5331
5332
5333__attribute__((__const__))
5334
5335__attribute__((__artificial__))
5336static inline int
5337rb_isascii(int c)
5338{
5339 return '\0' <= c && c <= '\x7f';
5340}
5341__attribute__((__const__))
5342
5343__attribute__((__artificial__))
5344static inline int
5345rb_isupper(int c)
5346{
5347 return 'A' <= c && c <= 'Z';
5348}
5349__attribute__((__const__))
5350
5351__attribute__((__artificial__))
5352static inline int
5353rb_islower(int c)
5354{
5355 return 'a' <= c && c <= 'z';
5356}
5357__attribute__((__const__))
5358
5359__attribute__((__artificial__))
5360static inline int
5361rb_isalpha(int c)
5362{
5363 return rb_isupper(c) || rb_islower(c);
5364}
5365__attribute__((__const__))
5366
5367__attribute__((__artificial__))
5368static inline int
5369rb_isdigit(int c)
5370{
5371 return '0' <= c && c <= '9';
5372}
5373__attribute__((__const__))
5374
5375__attribute__((__artificial__))
5376static inline int
5377rb_isalnum(int c)
5378{
5379 return rb_isalpha(c) || rb_isdigit(c);
5380}
5381__attribute__((__const__))
5382
5383__attribute__((__artificial__))
5384static inline int
5385rb_isxdigit(int c)
5386{
5387 return rb_isdigit(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f');
5388}
5389__attribute__((__const__))
5390
5391__attribute__((__artificial__))
5392static inline int
5393rb_isblank(int c)
5394{
5395 return c == ' ' || c == '\t';
5396}
5397__attribute__((__const__))
5398
5399__attribute__((__artificial__))
5400static inline int
5401rb_isspace(int c)
5402{
5403 return c == ' ' || ('\t' <= c && c <= '\r');
5404}
5405__attribute__((__const__))
5406
5407__attribute__((__artificial__))
5408static inline int
5409rb_iscntrl(int c)
5410{
5411 return ('\0' <= c && c < ' ') || c == '\x7f';
5412}
5413__attribute__((__const__))
5414
5415__attribute__((__artificial__))
5416static inline int
5417rb_isprint(int c)
5418{
5419 return ' ' <= c && c <= '\x7e';
5420}
5421__attribute__((__const__))
5422
5423__attribute__((__artificial__))
5424static inline int
5425rb_ispunct(int c)
5426{
5427 return !rb_isalnum(c);
5428}
5429__attribute__((__const__))
5430
5431__attribute__((__artificial__))
5432static inline int
5433rb_isgraph(int c)
5434{
5435 return '!' <= c && c <= '\x7e';
5436}
5437__attribute__((__const__))
5438
5439__attribute__((__artificial__))
5440static inline int
5441rb_tolower(int c)
5442{
5443 return rb_isupper(c) ? (c|0x20) : c;
5444}
5445__attribute__((__const__))
5446
5447__attribute__((__artificial__))
5448static inline int
5449rb_toupper(int c)
5450{
5451 return rb_islower(c) ? (c&0x5f) : c;
5452}
5453
5454
5455__attribute__((__nonnull__ ()))
5456VALUE rb_eval_string(const char *str);
5457__attribute__((__nonnull__ (1)))
5458VALUE rb_eval_string_protect(const char *str, int *state);
5459__attribute__((__nonnull__ (1)))
5460VALUE rb_eval_string_wrap(const char *str, int *state);
5461VALUE rb_funcall(VALUE recv, ID mid, int n, ...);
5462VALUE rb_funcallv(VALUE recv, ID mid, int argc, const VALUE *argv);
5463VALUE rb_funcallv_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat);
5464VALUE rb_funcallv_public(VALUE recv, ID mid, int argc, const VALUE *argv);
5465VALUE rb_funcallv_public_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat);
5466VALUE rb_funcall_passing_block(VALUE recv, ID mid, int argc, const VALUE *argv);
5467VALUE rb_funcall_passing_block_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat);
5468VALUE rb_funcall_with_block(VALUE recv, ID mid, int argc, const VALUE *argv, VALUE procval);
5469VALUE rb_funcall_with_block_kw(VALUE recv, ID mid, int argc, const VALUE *argv, VALUE procval, int kw_splat);
5470VALUE rb_call_super(int argc, const VALUE *argv);
5471VALUE rb_call_super_kw(int argc, const VALUE *argv, int kw_splat);
5472VALUE rb_current_receiver(void);
5473__attribute__((__nonnull__ (2)))
5474int rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, VALUE *values);
5475__attribute__((__nonnull__ ()))
5476VALUE rb_extract_keywords(VALUE *orighash);
5477
5478
5479typedef uint32_t rb_event_flag_t;
5480typedef void (*rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass);
5481
5482
5483void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data);
5485
5486
5487
5488
5489void rb_gc_register_address(VALUE *valptr);
5490void rb_global_variable(VALUE *);
5491void rb_gc_unregister_address(VALUE *valptr);
5492void rb_gc_register_mark_object(VALUE object);
5493
5494
5495
5496
5497typedef int ruby_glob_func(const char *path, VALUE arg, void *enc);
5498__attribute__((__nonnull__ ()))
5499void rb_glob(const char *pattern, void (*func)(const char *path, VALUE arg, void *enc), VALUE arg);
5500__attribute__((__nonnull__ ()))
5501int ruby_glob(const char *pattern, int flags, ruby_glob_func *func, VALUE arg);
5502__attribute__((__nonnull__ ()))
5503int ruby_brace_glob(const char *pattern, int flags, ruby_glob_func *func, VALUE arg);
5504
5505
5506
5507
5508extern VALUE rb_mKernel;
5509extern VALUE rb_mComparable;
5510extern VALUE rb_mEnumerable;
5511extern VALUE rb_mErrno;
5512extern VALUE rb_mFileTest;
5513extern VALUE rb_mGC;
5514extern VALUE rb_mMath;
5515extern VALUE rb_mProcess;
5516extern VALUE rb_mWaitReadable;
5517extern VALUE rb_mWaitWritable;
5518extern VALUE rb_cBasicObject;
5519extern VALUE rb_cObject;
5520extern VALUE rb_cArray;
5521extern VALUE rb_cBinding;
5522extern VALUE rb_cClass;
5523extern VALUE rb_cDir;
5524extern VALUE rb_cEncoding;
5525extern VALUE rb_cEnumerator;
5526extern VALUE rb_cFalseClass;
5527extern VALUE rb_cFile;
5528extern VALUE rb_cComplex;
5529extern VALUE rb_cFloat;
5530extern VALUE rb_cHash;
5531extern VALUE rb_cIO;
5532extern VALUE rb_cInteger;
5533extern VALUE rb_cMatch;
5534extern VALUE rb_cMethod;
5535extern VALUE rb_cModule;
5536extern VALUE rb_cRefinement;
5537extern VALUE rb_cNameErrorMesg;
5538extern VALUE rb_cNilClass;
5539extern VALUE rb_cNumeric;
5540extern VALUE rb_cProc;
5541extern VALUE rb_cRandom;
5542extern VALUE rb_cRange;
5543extern VALUE rb_cRational;
5544extern VALUE rb_cRegexp;
5545extern VALUE rb_cStat;
5546extern VALUE rb_cString;
5547extern VALUE rb_cStruct;
5548extern VALUE rb_cSymbol;
5549extern VALUE rb_cThread;
5550extern VALUE rb_cTime;
5551extern VALUE rb_cTrueClass;
5552extern VALUE rb_cUnboundMethod;
5553extern VALUE rb_eException;
5554extern VALUE rb_eStandardError;
5555extern VALUE rb_eSystemExit;
5556extern VALUE rb_eInterrupt;
5557extern VALUE rb_eSignal;
5558extern VALUE rb_eFatal;
5559extern VALUE rb_eArgError;
5560extern VALUE rb_eEOFError;
5561extern VALUE rb_eIndexError;
5562extern VALUE rb_eStopIteration;
5563extern VALUE rb_eKeyError;
5564extern VALUE rb_eRangeError;
5565extern VALUE rb_eIOError;
5566extern VALUE rb_eRuntimeError;
5567extern VALUE rb_eFrozenError;
5568extern VALUE rb_eSecurityError;
5569extern VALUE rb_eSystemCallError;
5570extern VALUE rb_eThreadError;
5571extern VALUE rb_eTypeError;
5572extern VALUE rb_eZeroDivError;
5573extern VALUE rb_eNotImpError;
5574extern VALUE rb_eNoMemError;
5575extern VALUE rb_eNoMethodError;
5576extern VALUE rb_eFloatDomainError;
5577extern VALUE rb_eLocalJumpError;
5578extern VALUE rb_eSysStackError;
5579extern VALUE rb_eRegexpError;
5580extern VALUE rb_eEncodingError;
5581extern VALUE rb_eEncCompatError;
5582extern VALUE rb_eNoMatchingPatternError;
5583extern VALUE rb_eNoMatchingPatternKeyError;
5584extern VALUE rb_eScriptError;
5585extern VALUE rb_eNameError;
5586extern VALUE rb_eSyntaxError;
5587extern VALUE rb_eLoadError;
5588extern VALUE rb_eMathDomainError;
5589extern VALUE rb_stdin;
5590extern VALUE rb_stdout;
5591extern VALUE rb_stderr;
5592__attribute__((__pure__))
5593static inline VALUE
5594rb_class_of(VALUE obj)
5595{
5596 if (! RB_SPECIAL_CONST_P(obj)) {
5597 return RBASIC_CLASS(obj);
5598 }
5599 else if (obj == ((VALUE)RUBY_Qfalse)) {
5600 return rb_cFalseClass;
5601 }
5602 else if (obj == ((VALUE)RUBY_Qnil)) {
5603 return rb_cNilClass;
5604 }
5605 else if (obj == ((VALUE)RUBY_Qtrue)) {
5606 return rb_cTrueClass;
5607 }
5608 else if (RB_FIXNUM_P(obj)) {
5609 return rb_cInteger;
5610 }
5611 else if (RB_STATIC_SYM_P(obj)) {
5612 return rb_cSymbol;
5613 }
5614 else if (RB_FLONUM_P(obj)) {
5615 return rb_cFloat;
5616 }
5617 __builtin_unreachable();
5618}
5619
5620
5621
5622
5623__attribute__((__nonnull__ ()))
5624void ruby_sysinit(int *argc, char ***argv);
5625void ruby_init(void);
5626void* ruby_options(int argc, char** argv);
5627int ruby_executable_node(void *n, int *status);
5628int ruby_run_node(void *n);
5629void ruby_show_version(void);
5630void ruby_show_copyright(void);
5631void ruby_init_stack(volatile VALUE *addr);
5632int ruby_setup(void);
5633int ruby_cleanup(int ex);
5634void ruby_finalize(void);
5635__attribute__((__noreturn__))
5636void ruby_stop(int);
5637int ruby_stack_check(void);
5638size_t ruby_stack_length(VALUE **topnotch);
5639int ruby_exec_node(void *n);
5640void ruby_script(const char* name);
5641void ruby_set_script_name(VALUE name);
5642void ruby_prog_init(void);
5643void ruby_set_argv(int argc, char **argv);
5644void *ruby_process_options(int argc, char **argv);
5645void ruby_init_loadpath(void);
5646void ruby_incpush(const char *path);
5647void ruby_sig_finalize(void);
5648
5649
5650
5651
5652typedef VALUE rb_block_call_func(VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg);
5653typedef rb_block_call_func *rb_block_call_func_t;
5654VALUE rb_each(VALUE obj);
5655VALUE rb_yield(VALUE val);
5656VALUE rb_yield_values(int n, ...);
5657VALUE rb_yield_values2(int n, const VALUE *argv);
5658VALUE rb_yield_values_kw(int n, const VALUE *argv, int kw_splat);
5659VALUE rb_yield_splat(VALUE ary);
5660VALUE rb_yield_splat_kw(VALUE ary, int kw_splat);
5661VALUE rb_yield_block(VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg);
5662int rb_keyword_given_p(void);
5663int rb_block_given_p(void);
5664void rb_need_block(void);
5665__attribute__((__deprecated__ ("by: rb_block_call since 1.9")))
5666VALUE rb_iterate(VALUE (*func1)(VALUE), VALUE data1, rb_block_call_func_t proc, VALUE data2);
5667VALUE rb_block_call(VALUE obj, ID mid, int argc, const VALUE *argv, rb_block_call_func_t proc, VALUE data2);
5668VALUE rb_block_call_kw(VALUE obj, ID mid, int argc, const VALUE *argv, rb_block_call_func_t proc, VALUE data2, int kw_splat);
5669VALUE rb_rescue(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*r_proc)(VALUE, VALUE), VALUE data2);
5670VALUE rb_rescue2(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*r_proc)(VALUE, VALUE), VALUE data2, ...);
5671VALUE rb_vrescue2(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*r_proc)(VALUE, VALUE), VALUE data2, va_list ap);
5672VALUE rb_ensure(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*e_proc)(VALUE), VALUE data2);
5673VALUE rb_catch(const char *tag, rb_block_call_func_t func, VALUE data);
5674VALUE rb_catch_obj(VALUE tag, rb_block_call_func_t func, VALUE data);
5675__attribute__((__noreturn__))
5676void rb_throw(const char *tag, VALUE val);
5677__attribute__((__noreturn__))
5678void rb_throw_obj(VALUE tag, VALUE val);
5679
5680
5682 _Bool left;
5683 size_t right;
5684};
5685
5686
5687__attribute__((__malloc__))
5688__attribute__((__returns_nonnull__))
5689__attribute__((__alloc_size__ (2)))
5690__attribute__((__nonnull__ ()))
5691void *rb_alloc_tmp_buffer(volatile VALUE *store, long len);
5692__attribute__((__malloc__))
5693__attribute__((__returns_nonnull__))
5694__attribute__((__alloc_size__ (2,3)))
5695__attribute__((__nonnull__ ()))
5696void *rb_alloc_tmp_buffer_with_count(volatile VALUE *store, size_t len,size_t count);
5697void rb_free_tmp_buffer(volatile VALUE *store);
5698__attribute__((__noreturn__))
5699void ruby_malloc_size_overflow(size_t x, size_t y);
5700
5701
5702static inline int
5703rb_mul_size_overflow(size_t a, size_t b, size_t max, size_t *c)
5704{
5705 __extension__ unsigned __int128 da, db, c2;
5706 da = a;
5707 db = b;
5708 c2 = da * db;
5709 if (c2 > max) return 1;
5710 *c = ((size_t)c2);
5711 return 0;
5712}
5713
5714__attribute__((__const__))
5715static inline struct rbimpl_size_mul_overflow_tag
5716rbimpl_size_mul_overflow(size_t x, size_t y)
5717{
5718 struct rbimpl_size_mul_overflow_tag ret = { 0, 0, };
5719 ret.left = __builtin_mul_overflow(x, y, &ret.right);
5720 return ret;
5721}
5722static inline size_t
5723rbimpl_size_mul_or_raise(size_t x, size_t y)
5724{
5725 struct rbimpl_size_mul_overflow_tag size =
5726 rbimpl_size_mul_overflow(x, y);
5727 if ((__builtin_expect(!!(! size.left), 1))) {
5728 return size.right;
5729 }
5730 else {
5731 ruby_malloc_size_overflow(x, y);
5732 __builtin_unreachable();
5733 }
5734}
5735static inline void *
5736rb_alloc_tmp_buffer2(volatile VALUE *store, long count, size_t elsize)
5737{
5738 const size_t total_size = rbimpl_size_mul_or_raise(count, elsize);
5739 const size_t cnt = (total_size + sizeof(VALUE) - 1) / sizeof(VALUE);
5740 return rb_alloc_tmp_buffer_with_count(store, total_size, cnt);
5741}
5742
5743
5744
5745__attribute__((__nonnull__ (1)))
5746__attribute__((__returns_nonnull__))
5747static inline void *
5748ruby_nonempty_memcpy(void *dest, const void *src, size_t n)
5749{
5750 if (n) {
5751 return memcpy(dest, src, n);
5752 }
5753 else {
5754 return dest;
5755 }
5756}
5757
5758
5759
5760
5761__attribute__((__nonnull__ ()))
5762VALUE rb_define_class(const char *name, VALUE super);
5763__attribute__((__nonnull__ ()))
5764VALUE rb_define_module(const char *name);
5765__attribute__((__nonnull__ ()))
5766VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super);
5767__attribute__((__nonnull__ ()))
5768VALUE rb_define_module_under(VALUE outer, const char *name);
5769void rb_include_module(VALUE klass, VALUE module);
5770void rb_extend_object(VALUE obj, VALUE mod);
5771void rb_prepend_module(VALUE klass, VALUE module);
5772
5773
5774
5775
5776VALUE rb_newobj(void);
5777VALUE rb_newobj_of(VALUE klass, VALUE flags);
5778VALUE rb_obj_setup(VALUE obj, VALUE klass, VALUE type);
5779VALUE rb_obj_class(VALUE obj);
5780VALUE rb_singleton_class_clone(VALUE obj);
5781void rb_singleton_class_attached(VALUE klass, VALUE obj);
5782void rb_copy_generic_ivar(VALUE clone, VALUE obj);
5783
5784
5785__attribute__((__deprecated__ ("This is no longer how Object#clone works.")))
5786static inline void
5787rb_clone_setup(VALUE clone, VALUE obj)
5788{
5789 return;
5790}
5791__attribute__((__deprecated__ ("This is no longer how Object#dup works.")))
5792static inline void
5793rb_dup_setup(VALUE dup, VALUE obj)
5794{
5795 return;
5796}
5797
5798
5799__attribute__((__nonnull__ ()))
5800
5801void rb_mem_clear(VALUE *buf, long len)
5802
5803 ;
5804VALUE rb_assoc_new(VALUE car, VALUE cdr);
5805VALUE rb_check_array_type(VALUE obj);
5806VALUE rb_ary_new(void);
5807VALUE rb_ary_new_capa(long capa);
5808VALUE rb_ary_new_from_args(long n, ...);
5809VALUE rb_ary_new_from_values(long n, const VALUE *elts);
5810VALUE rb_ary_tmp_new(long capa);
5811void rb_ary_free(VALUE ary);
5812void rb_ary_modify(VALUE ary);
5813VALUE rb_ary_freeze(VALUE obj);
5814__attribute__((__pure__))
5815VALUE rb_ary_shared_with_p(VALUE lhs, VALUE rhs);
5816VALUE rb_ary_aref(int argc, const VALUE *argv, VALUE ary);
5817VALUE rb_ary_subseq(VALUE ary, long beg, long len);
5818void rb_ary_store(VALUE ary, long key, VALUE val);
5819VALUE rb_ary_dup(VALUE ary);
5820VALUE rb_ary_resurrect(VALUE ary);
5821VALUE rb_ary_to_ary(VALUE obj);
5822VALUE rb_ary_to_s(VALUE ary);
5823VALUE rb_ary_cat(VALUE ary, const VALUE *train, long len);
5824VALUE rb_ary_push(VALUE ary, VALUE elem);
5825VALUE rb_ary_pop(VALUE ary);
5826VALUE rb_ary_shift(VALUE ary);
5827VALUE rb_ary_unshift(VALUE ary, VALUE elem);
5828__attribute__((__pure__))
5829VALUE rb_ary_entry(VALUE ary, long off);
5830VALUE rb_ary_each(VALUE ary);
5831VALUE rb_ary_join(VALUE ary, VALUE sep);
5832VALUE rb_ary_reverse(VALUE ary);
5833VALUE rb_ary_rotate(VALUE ary, long rot);
5834VALUE rb_ary_sort(VALUE ary);
5835VALUE rb_ary_sort_bang(VALUE ary);
5836VALUE rb_ary_delete(VALUE ary, VALUE elem);
5837VALUE rb_ary_delete_at(VALUE ary, long pos);
5838VALUE rb_ary_clear(VALUE ary);
5839VALUE rb_ary_plus(VALUE lhs, VALUE rhs);
5840VALUE rb_ary_concat(VALUE lhs, VALUE rhs);
5841VALUE rb_ary_assoc(VALUE alist, VALUE key);
5842VALUE rb_ary_rassoc(VALUE alist, VALUE key);
5843VALUE rb_ary_includes(VALUE ary, VALUE elem);
5844VALUE rb_ary_cmp(VALUE lhs, VALUE rhs);
5845VALUE rb_ary_replace(VALUE copy, VALUE orig);
5846VALUE rb_get_values_at(VALUE obj, long olen, int argc, const VALUE *argv, VALUE (*func)(VALUE obj, long oidx));
5847VALUE rb_ary_resize(VALUE ary, long len);
5848
5849
5850
5851
5852VALUE rb_exc_new(VALUE etype, const char *ptr, long len);
5853__attribute__((__nonnull__ ()))
5854VALUE rb_exc_new_cstr(VALUE etype, const char *str);
5855VALUE rb_exc_new_str(VALUE etype, VALUE str);
5856__attribute__((__noreturn__))
5857__attribute__((__nonnull__ (1)))
5858__attribute__((__format__(__printf__, 1, 2)))
5859void rb_loaderror(const char *fmt, ...);
5860__attribute__((__noreturn__))
5861__attribute__((__nonnull__ (2)))
5862__attribute__((__format__(__printf__, 2, 3)))
5863void rb_loaderror_with_path(VALUE path, const char *fmt, ...);
5864__attribute__((__noreturn__))
5865__attribute__((__nonnull__ (2)))
5866__attribute__((__format__(__printf__, 2, 3)))
5867void rb_name_error(ID name, const char *fmt, ...);
5868__attribute__((__noreturn__))
5869__attribute__((__nonnull__ (2)))
5870__attribute__((__format__(__printf__, 2, 3)))
5871void rb_name_error_str(VALUE name, const char *fmt, ...);
5872__attribute__((__noreturn__))
5873__attribute__((__nonnull__ (2)))
5874__attribute__((__format__(__printf__, 2, 3)))
5875void rb_frozen_error_raise(VALUE recv, const char *fmt, ...);
5876__attribute__((__noreturn__))
5877__attribute__((__nonnull__ ()))
5878void rb_invalid_str(const char *str, const char *type);
5879__attribute__((__noreturn__))
5880__attribute__((__nonnull__ ()))
5881void rb_error_frozen(const char *what);
5882__attribute__((__noreturn__))
5883void rb_error_frozen_object(VALUE what);
5884void rb_check_frozen(VALUE obj);
5885void rb_check_copyable(VALUE obj, VALUE orig);
5886__attribute__((__noreturn__))
5887static void rb_error_arity(int argc, int min, int max);
5888
5889
5890static inline void
5891rb_check_frozen_inline(VALUE obj)
5892{
5893 if ((__builtin_expect(!!(RB_OBJ_FROZEN(obj)), 0))) {
5894 rb_error_frozen_object(obj);
5895 }
5896}
5897static inline int
5898rb_check_arity(int argc, int min, int max)
5899{
5900 if ((argc < min) || (max != (-1) && argc > max))
5901 rb_error_arity(argc, min, max);
5902 return argc;
5903}
5904
5905
5906__attribute__((__nonnull__ ()))
5907void rb_st_foreach_safe(struct st_table *st, st_foreach_callback_func *func, st_data_t arg);
5908VALUE rb_check_hash_type(VALUE obj);
5909__attribute__((__nonnull__ ()))
5910void rb_hash_foreach(VALUE hash, int (*func)(VALUE key, VALUE val, VALUE arg), VALUE arg);
5911VALUE rb_hash(VALUE obj);
5912VALUE rb_hash_new(void);
5913VALUE rb_hash_new_capa(long capa);
5914VALUE rb_hash_dup(VALUE hash);
5915VALUE rb_hash_freeze(VALUE obj);
5916VALUE rb_hash_aref(VALUE hash, VALUE key);
5917VALUE rb_hash_lookup(VALUE hash, VALUE key);
5918VALUE rb_hash_lookup2(VALUE hash, VALUE key, VALUE def);
5919VALUE rb_hash_fetch(VALUE hash, VALUE key);
5920VALUE rb_hash_aset(VALUE hash, VALUE key, VALUE val);
5921VALUE rb_hash_clear(VALUE hash);
5922VALUE rb_hash_delete_if(VALUE hash);
5923VALUE rb_hash_delete(VALUE hash, VALUE key);
5924void rb_hash_bulk_insert(long argc, const VALUE *argv, VALUE hash);
5925typedef VALUE rb_hash_update_func(VALUE newkey, VALUE oldkey, VALUE value);
5926VALUE rb_hash_update_by(VALUE hash1, VALUE hash2, rb_hash_update_func *func);
5927int rb_path_check(const char *path);
5928VALUE rb_env_clear(void);
5929VALUE rb_hash_size(VALUE hash);
5930
5931
5932
5933
5934VALUE rb_block_proc(void);
5935VALUE rb_block_lambda(void);
5936VALUE rb_proc_new(rb_block_call_func_t func, VALUE callback_arg);
5937VALUE rb_obj_is_proc(VALUE recv);
5938VALUE rb_proc_call(VALUE recv, VALUE args);
5939VALUE rb_proc_call_kw(VALUE recv, VALUE args, int kw_splat);
5940VALUE rb_proc_call_with_block(VALUE recv, int argc, const VALUE *argv, VALUE proc);
5941VALUE rb_proc_call_with_block_kw(VALUE recv, int argc, const VALUE *argv, VALUE proc, int kw_splat);
5942int rb_proc_arity(VALUE recv);
5943VALUE rb_proc_lambda_p(VALUE recv);
5944VALUE rb_binding_new(void);
5945VALUE rb_obj_method(VALUE recv, VALUE mid);
5946VALUE rb_obj_is_method(VALUE recv);
5947VALUE rb_method_call(int argc, const VALUE *argv, VALUE recv);
5948VALUE rb_method_call_kw(int argc, const VALUE *argv, VALUE recv, int kw_splat);
5949VALUE rb_method_call_with_block(int argc, const VALUE *argv, VALUE recv, VALUE proc);
5950VALUE rb_method_call_with_block_kw(int argc, const VALUE *argv, VALUE recv, VALUE proc, int kw_splat);
5951int rb_mod_method_arity(VALUE mod, ID mid);
5952int rb_obj_method_arity(VALUE obj, ID mid);
5953__attribute__((__nonnull__ (1)))
5954VALUE rb_protect(VALUE (*func)(VALUE args), VALUE args, int *state);
5955
5956
5957
5958
5959__attribute__((__nonnull__ (2, 3)))
5960int rb_scan_args(int argc, const VALUE *argv, const char *fmt, ...);
5961__attribute__((__nonnull__ (3, 4)))
5962int rb_scan_args_kw(int kw_splat, int argc, const VALUE *argv, const char *fmt, ...);
5963__attribute__((__error__ ("bad scan arg format")))
5964void rb_scan_args_bad_format(const char*);
5965__attribute__((__error__ ("variable argument length doesn't match")))
5966void rb_scan_args_length_mismatch(const char*,int);
5967
5968
5969static inline _Bool
5970rb_scan_args_keyword_p(int kw_flag, VALUE last)
5971{
5972 switch (kw_flag) {
5973 case 0:
5974 return !! rb_keyword_given_p();
5975 case 1:
5976 return 1;
5977 case 3:
5978 return RB_TYPE_P(last, RUBY_T_HASH);
5979 default:
5980 return 0;
5981 }
5982}
5983__attribute__((__always_inline__)) inline
5984static _Bool
5985rb_scan_args_lead_p(const char *fmt)
5986{
5987 return (((unsigned char)((fmt[0])-'0'))<10);
5988}
5989__attribute__((__always_inline__)) inline
5990static int
5991rb_scan_args_n_lead(const char *fmt)
5992{
5993 return (rb_scan_args_lead_p(fmt) ? fmt[0]-'0' : 0);
5994}
5995__attribute__((__always_inline__)) inline
5996static _Bool
5997rb_scan_args_opt_p(const char *fmt)
5998{
5999 return (rb_scan_args_lead_p(fmt) && (((unsigned char)((fmt[1])-'0'))<10));
6000}
6001__attribute__((__always_inline__)) inline
6002static int
6003rb_scan_args_n_opt(const char *fmt)
6004{
6005 return (rb_scan_args_opt_p(fmt) ? fmt[1]-'0' : 0);
6006}
6007__attribute__((__always_inline__)) inline
6008static int
6009rb_scan_args_var_idx(const char *fmt)
6010{
6011 return (!rb_scan_args_lead_p(fmt) ? 0 : !(((unsigned char)((fmt[1])-'0'))<10) ? 1 : 2);
6012}
6013__attribute__((__always_inline__)) inline
6014static _Bool
6015rb_scan_args_f_var(const char *fmt)
6016{
6017 return (fmt[rb_scan_args_var_idx(fmt)]=='*');
6018}
6019__attribute__((__always_inline__)) inline
6020static int
6021rb_scan_args_trail_idx(const char *fmt)
6022{
6023 const int idx = rb_scan_args_var_idx(fmt);
6024 return idx+(fmt[idx]=='*');
6025}
6026__attribute__((__always_inline__)) inline
6027static int
6028rb_scan_args_n_trail(const char *fmt)
6029{
6030 const int idx = rb_scan_args_trail_idx(fmt);
6031 return ((((unsigned char)((fmt[idx])-'0'))<10) ? fmt[idx]-'0' : 0);
6032}
6033__attribute__((__always_inline__)) inline
6034static int
6035rb_scan_args_hash_idx(const char *fmt)
6036{
6037 const int idx = rb_scan_args_trail_idx(fmt);
6038 return idx+(((unsigned char)((fmt[idx])-'0'))<10);
6039}
6040__attribute__((__always_inline__)) inline
6041static _Bool
6042rb_scan_args_f_hash(const char *fmt)
6043{
6044 return (fmt[rb_scan_args_hash_idx(fmt)]==':');
6045}
6046__attribute__((__always_inline__)) inline
6047static int
6048rb_scan_args_block_idx(const char *fmt)
6049{
6050 const int idx = rb_scan_args_hash_idx(fmt);
6051 return idx+(fmt[idx]==':');
6052}
6053__attribute__((__always_inline__)) inline
6054static _Bool
6055rb_scan_args_f_block(const char *fmt)
6056{
6057 return (fmt[rb_scan_args_block_idx(fmt)]=='&');
6058}
6059__attribute__((__always_inline__)) inline
6060static int
6061rb_scan_args_set(int kw_flag, int argc, const VALUE *argv,
6062 int n_lead, int n_opt, int n_trail,
6063 _Bool f_var, _Bool f_hash, _Bool f_block,
6064 VALUE *vars[], const char *fmt [[maybe_unused]], int varc [[maybe_unused]])
6065
6066
6067{
6068 int i, argi = 0, vari = 0;
6069 VALUE *var, hash = ((VALUE)RUBY_Qnil);
6070 const int n_mand = n_lead + n_trail;
6071 if (f_hash && argc > 0) {
6072 VALUE last = argv[argc - 1];
6073 if (rb_scan_args_keyword_p(kw_flag, last)) {
6074 hash = rb_hash_dup(last);
6075 argc--;
6076 }
6077 }
6078 if (argc < n_mand) {
6079 goto argc_error;
6080 }
6081 for (i = 0; i < n_lead; i++) {
6082 var = vars[vari++];
6083 if (var) *var = argv[argi];
6084 argi++;
6085 }
6086 for (i = 0; i < n_opt; i++) {
6087 var = vars[vari++];
6088 if (argi < argc - n_trail) {
6089 if (var) *var = argv[argi];
6090 argi++;
6091 }
6092 else {
6093 if (var) *var = ((VALUE)RUBY_Qnil);
6094 }
6095 }
6096 if (f_var) {
6097 int n_var = argc - argi - n_trail;
6098 var = vars[vari++];
6099 if (0 < n_var) {
6100 if (var) *var = rb_ary_new_from_values(n_var, &argv[argi]);
6101 argi += n_var;
6102 }
6103 else {
6104 if (var) *var = rb_ary_new();
6105 }
6106 }
6107 for (i = 0; i < n_trail; i++) {
6108 var = vars[vari++];
6109 if (var) *var = argv[argi];
6110 argi++;
6111 }
6112 if (f_hash) {
6113 var = vars[vari++];
6114 if (var) *var = hash;
6115 }
6116 if (f_block) {
6117 var = vars[vari++];
6118 if (rb_block_given_p()) {
6119 *var = rb_block_proc();
6120 }
6121 else {
6122 *var = ((VALUE)RUBY_Qnil);
6123 }
6124 }
6125 if (argi == argc) {
6126 return argc;
6127 }
6128 argc_error:
6129 rb_error_arity(argc, n_mand, f_var ? (-1) : n_mand + n_opt);
6130 __builtin_unreachable();
6131}
6132
6133
6134ID rb_sym2id(VALUE obj);
6135VALUE rb_id2sym(ID id);
6136__attribute__((__nonnull__ ()))
6137ID rb_intern(const char *name);
6138ID rb_intern2(const char *name, long len);
6139ID rb_intern_str(VALUE str);
6140const char *rb_id2name(ID id);
6141__attribute__((__nonnull__ ()))
6142ID rb_check_id(volatile VALUE *namep);
6143ID rb_to_id(VALUE str);
6144VALUE rb_id2str(ID id);
6145VALUE rb_sym2str(VALUE id);
6146VALUE rb_to_symbol(VALUE name);
6147__attribute__((__nonnull__ ()))
6148VALUE rb_check_symbol(volatile VALUE *namep);
6149
6150
6151__attribute__((__pure__))
6152__attribute__((__nonnull__ ()))
6153static inline ID
6154rb_intern_const(const char *str)
6155{
6156 size_t len = strlen(str);
6157 return rb_intern2(str, ((long)len));
6158}
6159
6160__attribute__((__nonnull__ ()))
6161static inline ID
6162rbimpl_intern_const(ID *ptr, const char *str)
6163{
6164 while (! *ptr) {
6165 *ptr = rb_intern_const(str);
6166 }
6167 return *ptr;
6168}
6169
6170
6171typedef VALUE rb_gvar_getter_t(ID id, VALUE *data);
6172typedef void rb_gvar_setter_t(VALUE val, ID id, VALUE *data);
6173typedef void rb_gvar_marker_t(VALUE *var);
6174rb_gvar_getter_t rb_gvar_undef_getter;
6175rb_gvar_setter_t rb_gvar_undef_setter;
6176rb_gvar_marker_t rb_gvar_undef_marker;
6177rb_gvar_getter_t rb_gvar_val_getter;
6178rb_gvar_setter_t rb_gvar_val_setter;
6179rb_gvar_marker_t rb_gvar_val_marker;
6180rb_gvar_getter_t rb_gvar_var_getter;
6181rb_gvar_setter_t rb_gvar_var_setter;
6182rb_gvar_marker_t rb_gvar_var_marker;
6183__attribute__((__noreturn__))
6184rb_gvar_setter_t rb_gvar_readonly_setter;
6185__attribute__((__nonnull__ ()))
6186void rb_define_variable(const char *name, VALUE *var);
6187__attribute__((__nonnull__ (1)))
6188void rb_define_virtual_variable(const char *name, rb_gvar_getter_t *getter, rb_gvar_setter_t *setter);
6189__attribute__((__nonnull__ (1)))
6190void rb_define_hooked_variable(const char *name, VALUE *var, rb_gvar_getter_t *getter, rb_gvar_setter_t *setter);
6191__attribute__((__nonnull__ ()))
6192void rb_define_readonly_variable(const char *name, const VALUE *var);
6193__attribute__((__nonnull__ ()))
6194void rb_define_const(VALUE klass, const char *name, VALUE val);
6195__attribute__((__nonnull__ ()))
6196void rb_define_global_const(const char *name, VALUE val);
6197__attribute__((__nonnull__ ()))
6198void rb_deprecate_constant(VALUE mod, const char *name);
6199__attribute__((__nonnull__ ()))
6200VALUE rb_gv_set(const char *name, VALUE val);
6201__attribute__((__nonnull__ ()))
6202VALUE rb_gv_get(const char *name);
6203__attribute__((__nonnull__ ()))
6204VALUE rb_iv_get(VALUE obj, const char *name);
6205__attribute__((__nonnull__ ()))
6206VALUE rb_iv_set(VALUE obj, const char *name, VALUE val);
6207
6208
6209
6210
6211VALUE rb_get_path(VALUE obj);
6212VALUE rb_get_path_no_checksafe(VALUE);
6213__attribute__((__error__ (" argument length doesn't match"))) int rb_varargs_bad_length(int,int);
6214const char *rb_class2name(VALUE klass);
6215const char *rb_obj_classname(VALUE obj);
6216void rb_p(VALUE obj);
6217VALUE rb_equal(VALUE lhs, VALUE rhs);
6218VALUE rb_require(const char *feature);
6219
6220
6221VALUE rb_big_new(size_t len, int sign);
6222int rb_bigzero_p(VALUE x);
6223VALUE rb_big_clone(VALUE num);
6224void rb_big_2comp(VALUE num);
6225VALUE rb_big_norm(VALUE x);
6226void rb_big_resize(VALUE big, size_t len);
6227__attribute__((__nonnull__ ()))
6228VALUE rb_cstr_to_inum(const char *str, int base, int badcheck);
6229VALUE rb_str_to_inum(VALUE str, int base, int badcheck);
6230__attribute__((__nonnull__ ()))
6231VALUE rb_cstr2inum(const char *str, int base);
6232VALUE rb_str2inum(VALUE str, int base);
6233VALUE rb_big2str(VALUE x, int base);
6234long rb_big2long(VALUE x);
6235unsigned long rb_big2ulong(VALUE x);
6236long long rb_big2ll(VALUE);
6237unsigned long long rb_big2ull(VALUE);
6238__attribute__((__nonnull__ ()))
6239void rb_big_pack(VALUE val, unsigned long *buf, long num_longs);
6240__attribute__((__nonnull__ ()))
6241VALUE rb_big_unpack(unsigned long *buf, long num_longs);
6242__attribute__((__nonnull__ ()))
6243int rb_uv_to_utf8(char buf[6], unsigned long uv);
6244VALUE rb_dbl2big(double d);
6245double rb_big2dbl(VALUE x);
6246VALUE rb_big_cmp(VALUE lhs, VALUE rhs);
6247VALUE rb_big_eq(VALUE lhs, VALUE rhs);
6248VALUE rb_big_eql(VALUE lhs, VALUE rhs);
6249VALUE rb_big_plus(VALUE x, VALUE y);
6250VALUE rb_big_minus(VALUE x, VALUE y);
6251VALUE rb_big_mul(VALUE x, VALUE y);
6252VALUE rb_big_div(VALUE x, VALUE y);
6253VALUE rb_big_idiv(VALUE x, VALUE y);
6254VALUE rb_big_modulo(VALUE x, VALUE y);
6255VALUE rb_big_divmod(VALUE x, VALUE y);
6256VALUE rb_big_pow(VALUE x, VALUE y);
6257VALUE rb_big_and(VALUE x, VALUE y);
6258VALUE rb_big_or(VALUE x, VALUE y);
6259VALUE rb_big_xor(VALUE x, VALUE y);
6260VALUE rb_big_lshift(VALUE x, VALUE y);
6261VALUE rb_big_rshift(VALUE x, VALUE y);
6262__attribute__((__nonnull__ ()))
6263int rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
6264__attribute__((__nonnull__ ()))
6265VALUE rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
6266size_t rb_absint_size(VALUE val, int *nlz_bits_ret);
6267size_t rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret);
6268int rb_absint_singlebit_p(VALUE val);
6269
6270
6271
6272
6273int rb_cmpint(VALUE val, VALUE a, VALUE b);
6274__attribute__((__cold__))
6275__attribute__((__noreturn__))
6276void rb_cmperr(VALUE a, VALUE b);
6277
6278
6279
6280
6281VALUE rb_complex_raw(VALUE real, VALUE imag);
6282VALUE rb_complex_new(VALUE real, VALUE imag);
6283VALUE rb_complex_new_polar(VALUE abs, VALUE arg);
6284__attribute__((__deprecated__ ("by: rb_complex_new_polar")))
6285VALUE rb_complex_polar(VALUE abs, VALUE arg);
6286__attribute__((__pure__))
6287VALUE rb_complex_real(VALUE z);
6288__attribute__((__pure__))
6289VALUE rb_complex_imag(VALUE z);
6290VALUE rb_complex_plus(VALUE x, VALUE y);
6291VALUE rb_complex_minus(VALUE x, VALUE y);
6292VALUE rb_complex_mul(VALUE x, VALUE y);
6293VALUE rb_complex_div(VALUE x, VALUE y);
6294VALUE rb_complex_uminus(VALUE z);
6295VALUE rb_complex_conjugate(VALUE z);
6296VALUE rb_complex_abs(VALUE z);
6297VALUE rb_complex_arg(VALUE z);
6298VALUE rb_complex_pow(VALUE base, VALUE exp);
6299VALUE rb_dbl_complex_new(double real, double imag);
6300VALUE rb_Complex(VALUE real, VALUE imag);
6301
6302
6303
6304
6305VALUE rb_fiber_new(rb_block_call_func_t func, VALUE callback_obj);
6306VALUE rb_fiber_current(void);
6307VALUE rb_fiber_alive_p(VALUE fiber);
6308VALUE rb_obj_is_fiber(VALUE obj);
6309VALUE rb_fiber_resume(VALUE fiber, int argc, const VALUE *argv);
6310VALUE rb_fiber_resume_kw(VALUE fiber, int argc, const VALUE *argv, int kw_splat);
6311VALUE rb_fiber_yield(int argc, const VALUE *argv);
6312VALUE rb_fiber_yield_kw(int argc, const VALUE *argv, int kw_splat);
6313VALUE rb_fiber_transfer(VALUE fiber, int argc, const VALUE *argv);
6314VALUE rb_fiber_transfer_kw(VALUE fiber, int argc, const VALUE *argv, int kw_splat);
6315VALUE rb_fiber_raise(VALUE fiber, int argc, const VALUE *argv);
6316
6317
6318
6319
6320VALUE rb_dir_getwd(void);
6321
6322
6323
6324
6325VALUE rb_enum_values_pack(int argc, const VALUE *argv);
6326
6327
6328
6329
6330__attribute__((__noreturn__))
6331void rb_exc_raise(VALUE exc);
6332__attribute__((__noreturn__))
6333void rb_exc_fatal(VALUE exc);
6334__attribute__((__noreturn__))
6335VALUE rb_f_exit(int argc, const VALUE *argv);
6336__attribute__((__noreturn__))
6337VALUE rb_f_abort(int argc, const VALUE *argv);
6338__attribute__((__noreturn__))
6339void rb_interrupt(void);
6340ID rb_frame_this_func(void);
6341__attribute__((__noreturn__))
6342void rb_jump_tag(int state);
6343void rb_obj_call_init(VALUE obj, int argc, const VALUE *argv);
6344void rb_obj_call_init_kw(VALUE, int, const VALUE*, int);
6345ID rb_frame_callee(void);
6346VALUE rb_make_exception(int argc, const VALUE *argv);
6347void rb_set_end_proc(void (*func)(VALUE arg), VALUE arg);
6348
6349
6350
6351
6352typedef VALUE rb_enumerator_size_func(VALUE recv, VALUE argv, VALUE eobj);
6353typedef struct {
6354 VALUE begin;
6355 VALUE end;
6356 VALUE step;
6357 int exclude_end;
6358} rb_arithmetic_sequence_components_t;
6359VALUE rb_enumeratorize(VALUE recv, VALUE meth, int argc, const VALUE *argv);
6360VALUE rb_enumeratorize_with_size(VALUE recv, VALUE meth, int argc, const VALUE *argv, rb_enumerator_size_func *func);
6361VALUE rb_enumeratorize_with_size_kw(VALUE recv, VALUE meth, int argc, const VALUE *argv, rb_enumerator_size_func *func, int kw_splat);
6362__attribute__((__nonnull__ ()))
6363int rb_arithmetic_sequence_extract(VALUE as, rb_arithmetic_sequence_components_t *buf);
6364__attribute__((__nonnull__ ()))
6365VALUE rb_arithmetic_sequence_beg_len_step(VALUE as, long *begp, long *lenp, long *stepp, long len, int err);
6366
6367
6368
6369
6370__attribute__((__nonnull__ ()))
6371VALUE rb_file_s_expand_path(int argc, const VALUE *argv);
6372VALUE rb_file_expand_path(VALUE fname, VALUE dname);
6373__attribute__((__nonnull__ ()))
6374VALUE rb_file_s_absolute_path(int argc, const VALUE *argv);
6375VALUE rb_file_absolute_path(VALUE fname, VALUE dname);
6376VALUE rb_file_dirname(VALUE fname);
6377__attribute__((__nonnull__ ()))
6378int rb_find_file_ext(VALUE *feature, const char *const *exts);
6379VALUE rb_find_file(VALUE path);
6380VALUE rb_file_directory_p(VALUE _, VALUE path);
6381VALUE rb_str_encode_ospath(VALUE path);
6382__attribute__((__nonnull__ ()))
6383__attribute__((__pure__))
6384int rb_is_absolute_path(const char *path);
6385off_t rb_file_size(VALUE file);
6386
6387
6388
6389
6390__attribute__((__cold__))
6391__attribute__((__noreturn__))
6392void rb_memerror(void);
6393__attribute__((__pure__))
6394int rb_during_gc(void);
6395__attribute__((__nonnull__ (1)))
6396void rb_gc_mark_locations(const VALUE *start, const VALUE *end);
6397void rb_mark_tbl(struct st_table *tbl);
6398void rb_mark_tbl_no_pin(struct st_table *tbl);
6399void rb_mark_set(struct st_table *tbl);
6400void rb_mark_hash(struct st_table *tbl);
6401void rb_gc_update_tbl_refs(st_table *ptr);
6402void rb_gc_mark_maybe(VALUE obj);
6403void rb_gc_mark(VALUE obj);
6404void rb_gc_mark_movable(VALUE obj);
6405VALUE rb_gc_location(VALUE obj);
6406__attribute__((__deprecated__ ("this is now a no-op function")))
6407void rb_gc_force_recycle(VALUE obj);
6408void rb_gc(void);
6409void rb_gc_copy_finalizer(VALUE dst, VALUE src);
6410VALUE rb_gc_enable(void);
6411VALUE rb_gc_disable(void);
6412VALUE rb_gc_start(void);
6413VALUE rb_define_finalizer(VALUE obj, VALUE block);
6414VALUE rb_undefine_finalizer(VALUE obj);
6415size_t rb_gc_count(void);
6416size_t rb_gc_stat(VALUE key_or_buf);
6417VALUE rb_gc_latest_gc_info(VALUE key_or_buf);
6418void rb_gc_adjust_memory_usage(ssize_t diff);
6419
6420
6421
6422
6423extern VALUE rb_fs;
6424extern VALUE rb_output_fs;
6425extern VALUE rb_rs;
6426extern VALUE rb_default_rs;
6427extern VALUE rb_output_rs;
6428VALUE rb_io_write(VALUE io, VALUE str);
6429VALUE rb_io_gets(VALUE io);
6430VALUE rb_io_getbyte(VALUE io);
6431VALUE rb_io_ungetc(VALUE io, VALUE c);
6432VALUE rb_io_ungetbyte(VALUE io, VALUE b);
6433VALUE rb_io_close(VALUE io);
6434VALUE rb_io_flush(VALUE io);
6435VALUE rb_io_eof(VALUE io);
6436VALUE rb_io_binmode(VALUE io);
6437VALUE rb_io_ascii8bit_binmode(VALUE io);
6438VALUE rb_io_addstr(VALUE io, VALUE str);
6439VALUE rb_io_printf(int argc, const VALUE *argv, VALUE io);
6440VALUE rb_io_print(int argc, const VALUE *argv, VALUE io);
6441VALUE rb_io_puts(int argc, const VALUE *argv, VALUE io);
6442VALUE rb_io_fdopen(int fd, int flags, const char *path);
6443__attribute__((__nonnull__ ()))
6444VALUE rb_file_open(const char *fname, const char *fmode);
6445__attribute__((__nonnull__ ()))
6446VALUE rb_file_open_str(VALUE fname, const char *fmode);
6447VALUE rb_gets(void);
6448__attribute__((__nonnull__ ()))
6449void rb_write_error(const char *str);
6450void rb_write_error2(const char *str, long len);
6451void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds);
6452__attribute__((__nonnull__ ()))
6453int rb_pipe(int *pipes);
6454int rb_reserved_fd_p(int fd);
6455int rb_cloexec_open(const char *pathname, int flags, mode_t mode);
6456int rb_cloexec_dup(int oldfd);
6457int rb_cloexec_dup2(int oldfd, int newfd);
6458__attribute__((__nonnull__ ()))
6459int rb_cloexec_pipe(int fildes[2]);
6460int rb_cloexec_fcntl_dupfd(int fd, int minfd);
6461void rb_update_max_fd(int fd);
6462void rb_fd_fix_cloexec(int fd);
6463
6464
6465
6466
6467void rb_load(VALUE path, int wrap);
6468void rb_load_protect(VALUE path, int wrap, int *state);
6469__attribute__((__nonnull__ ()))
6470int rb_provided(const char *feature);
6471__attribute__((__nonnull__ (1)))
6472int rb_feature_provided(const char *feature, const char **loading);
6473__attribute__((__nonnull__ ()))
6474void rb_provide(const char *feature);
6475VALUE rb_f_require(VALUE self, VALUE feature);
6476VALUE rb_require_string(VALUE feature);
6477void rb_ext_ractor_safe(_Bool flag);
6478
6479
6480
6481
6482VALUE rb_marshal_dump(VALUE obj, VALUE port);
6483VALUE rb_marshal_load(VALUE port);
6484void rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE (*dumper)(VALUE), VALUE (*loader)(VALUE, VALUE));
6485
6486
6487
6488
6489__attribute__((__noreturn__))
6490__attribute__((__cold__))
6491void rb_num_zerodiv(void);
6492VALUE rb_num_coerce_bin(VALUE lhs, VALUE rhs, ID op);
6493VALUE rb_num_coerce_cmp(VALUE lhs, VALUE rhs, ID op);
6494VALUE rb_num_coerce_relop(VALUE lhs, VALUE rhs, ID op);
6495VALUE rb_num_coerce_bit(VALUE lhs, VALUE rhs, ID op);
6496VALUE rb_num2fix(VALUE val);
6497VALUE rb_fix2str(VALUE val, int base);
6498__attribute__((__const__))
6499VALUE rb_dbl_cmp(double lhs, double rhs);
6500extern VALUE rb_int_positive_pow(long x, unsigned long y);
6501
6502
6503
6504
6505VALUE rb_class_new_instance_pass_kw(int argc, const VALUE *argv, VALUE klass);
6506VALUE rb_class_new_instance(int argc, const VALUE *argv, VALUE klass);
6507VALUE rb_class_new_instance_kw(int argc, const VALUE *argv, VALUE klass, int kw_splat);
6508int rb_eql(VALUE lhs, VALUE rhs);
6509VALUE rb_any_to_s(VALUE obj);
6510VALUE rb_inspect(VALUE obj);
6511VALUE rb_obj_is_instance_of(VALUE obj, VALUE klass);
6512VALUE rb_obj_is_kind_of(VALUE obj, VALUE klass);
6513VALUE rb_obj_alloc(VALUE klass);
6514VALUE rb_obj_clone(VALUE obj);
6515VALUE rb_obj_dup(VALUE obj);
6516VALUE rb_obj_init_copy(VALUE src, VALUE dst);
6517VALUE rb_obj_freeze(VALUE obj);
6518__attribute__((__pure__))
6519VALUE rb_obj_frozen_p(VALUE obj);
6520VALUE rb_obj_id(VALUE obj);
6521__attribute__((__const__))
6522VALUE rb_memory_id(VALUE obj);
6523__attribute__((__pure__))
6524VALUE rb_class_real(VALUE klass);
6525__attribute__((__pure__))
6526VALUE rb_class_inherited_p(VALUE scion, VALUE ascendant);
6527__attribute__((__pure__))
6528VALUE rb_class_superclass(VALUE klass);
6529__attribute__((__nonnull__ ()))
6530VALUE rb_convert_type(VALUE val, int type, const char *name, const char *mid);
6531__attribute__((__nonnull__ ()))
6532VALUE rb_check_convert_type(VALUE val, int type, const char *name, const char *mid);
6533__attribute__((__nonnull__ ()))
6534VALUE rb_check_to_integer(VALUE val, const char *mid);
6535VALUE rb_check_to_float(VALUE val);
6536VALUE rb_to_int(VALUE val);
6537VALUE rb_check_to_int(VALUE val);
6538VALUE rb_Integer(VALUE val);
6539VALUE rb_to_float(VALUE val);
6540VALUE rb_Float(VALUE val);
6541VALUE rb_String(VALUE val);
6542VALUE rb_Array(VALUE val);
6543VALUE rb_Hash(VALUE val);
6544__attribute__((__nonnull__ ()))
6545double rb_cstr_to_dbl(const char *str, int mode);
6546double rb_str_to_dbl(VALUE str, int mode);
6547
6548
6549
6550
6551ID rb_id_attrset(ID id);
6552__attribute__((__const__))
6553int rb_is_const_id(ID id);
6554__attribute__((__const__))
6555int rb_is_global_id(ID id);
6556__attribute__((__const__))
6557int rb_is_instance_id(ID id);
6558__attribute__((__const__))
6559int rb_is_attrset_id(ID id);
6560__attribute__((__const__))
6561int rb_is_class_id(ID id);
6562__attribute__((__const__))
6563int rb_is_local_id(ID id);
6564__attribute__((__const__))
6565int rb_is_junk_id(ID);
6566__attribute__((__nonnull__ ()))
6567int rb_symname_p(const char *str);
6568VALUE rb_backref_get(void);
6569void rb_backref_set(VALUE md);
6570VALUE rb_lastline_get(void);
6571void rb_lastline_set(VALUE str);
6572VALUE rb_sym_all_symbols(void);
6573
6574
6575
6576
6577void rb_last_status_set(int status, pid_t pid);
6578VALUE rb_last_status_get(void);
6579__attribute__((__nonnull__ ()))
6580int rb_proc_exec(const char *cmd);
6581__attribute__((__noreturn__))
6582VALUE rb_f_exec(int argc, const VALUE *argv);
6583pid_t rb_waitpid(pid_t pid, int *status, int flags);
6584void rb_syswait(pid_t pid);
6585pid_t rb_spawn(int argc, const VALUE *argv);
6586pid_t rb_spawn_err(int argc, const VALUE *argv, char *errbuf, size_t buflen);
6587VALUE rb_proc_times(VALUE _);
6588VALUE rb_detach_process(pid_t pid);
6589
6590
6591
6592
6593unsigned int rb_genrand_int32(void);
6594double rb_genrand_real(void);
6595void rb_reset_random_seed(void);
6596VALUE rb_random_bytes(VALUE rnd, long n);
6597unsigned int rb_random_int32(VALUE rnd);
6598double rb_random_real(VALUE rnd);
6599unsigned long rb_random_ulong_limited(VALUE rnd, unsigned long limit);
6600unsigned long rb_genrand_ulong_limited(unsigned long i);
6601
6602
6603
6604
6605VALUE rb_range_new(VALUE beg, VALUE end, int excl);
6606__attribute__((__nonnull__ ()))
6607VALUE rb_range_beg_len(VALUE range, long *begp, long *lenp, long len, int err);
6608__attribute__((__nonnull__ ()))
6609int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp);
6610
6611
6612
6613
6614VALUE rb_rational_raw(VALUE num, VALUE den);
6615VALUE rb_rational_new(VALUE num, VALUE den);
6616VALUE rb_Rational(VALUE num, VALUE den);
6617__attribute__((__pure__))
6618VALUE rb_rational_num(VALUE rat);
6619__attribute__((__pure__))
6620VALUE rb_rational_den(VALUE rat);
6621VALUE rb_flt_rationalize_with_prec(VALUE flt, VALUE prec);
6622VALUE rb_flt_rationalize(VALUE flt);
6623
6624
6625
6626
6627int rb_memcicmp(const void *s1,const void *s2, long n);
6628void rb_match_busy(VALUE md);
6629VALUE rb_reg_nth_defined(int n, VALUE md);
6630VALUE rb_reg_nth_match(int n, VALUE md);
6631int rb_reg_backref_number(VALUE match, VALUE backref);
6632VALUE rb_reg_last_match(VALUE md);
6633VALUE rb_reg_match_pre(VALUE md);
6634VALUE rb_reg_match_post(VALUE md);
6635VALUE rb_reg_match_last(VALUE md);
6636VALUE rb_reg_new_str(VALUE src, int opts);
6637__attribute__((__nonnull__ ()))
6638VALUE rb_reg_new(const char *src, long len, int opts);
6639VALUE rb_reg_alloc(void);
6640VALUE rb_reg_init_str(VALUE re, VALUE s, int options);
6641VALUE rb_reg_match(VALUE re, VALUE str);
6642VALUE rb_reg_match2(VALUE re);
6643int rb_reg_options(VALUE re);
6644
6645
6646
6647
6648extern VALUE rb_argv0;
6649VALUE rb_get_argv(void);
6650__attribute__((__nonnull__ ()))
6651void *rb_load_file(const char *file);
6652void *rb_load_file_str(VALUE file);
6653
6654
6655struct timeval;
6656typedef struct {
6657 int maxfd;
6658 fd_set *fdset;
6659} rb_fdset_t;
6660
6661
6662__attribute__((__nonnull__ ()))
6663void rb_fd_init(rb_fdset_t *f);
6664__attribute__((__nonnull__ ()))
6665void rb_fd_term(rb_fdset_t *f);
6666__attribute__((__nonnull__ ()))
6667void rb_fd_zero(rb_fdset_t *f);
6668__attribute__((__nonnull__ ()))
6669void rb_fd_set(int fd, rb_fdset_t *f);
6670__attribute__((__nonnull__ ()))
6671void rb_fd_clr(int fd, rb_fdset_t *f);
6672__attribute__((__nonnull__ ()))
6673__attribute__((__pure__))
6674int rb_fd_isset(int fd, const rb_fdset_t *f);
6675void rb_fd_copy(rb_fdset_t *dst, const fd_set *src, int max);
6676void rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src);
6677int rb_fd_select(int nfds, rb_fdset_t *rfds, rb_fdset_t *wfds, rb_fdset_t *efds, struct timeval *timeout);
6678
6679
6680__attribute__((__nonnull__ ()))
6681__attribute__((__pure__))
6682static inline fd_set *
6683rb_fd_ptr(const rb_fdset_t *f)
6684{
6685 return f->fdset;
6686}
6687__attribute__((__nonnull__ ()))
6688__attribute__((__pure__))
6689static inline int
6690rb_fd_max(const rb_fdset_t *f)
6691{
6692 return f->maxfd;
6693}
6694
6695
6696struct timeval;
6697int rb_thread_fd_select(int nfds, rb_fdset_t *rfds, rb_fdset_t *wfds, rb_fdset_t *efds, struct timeval *timeout);
6698
6699
6700
6701
6702__attribute__((__nonnull__ ()))
6703VALUE rb_f_kill(int argc, const VALUE *argv);
6704void (*ruby_posix_signal(int, void (*)(int)))(int);
6705__attribute__((__pure__))
6706const char *ruby_signal_name(int signo);
6707void ruby_default_signal(int sig);
6708
6709
6710
6711
6712VALUE rb_f_sprintf(int argc, const VALUE *argv);
6713__attribute__((__nonnull__ (1)))
6714__attribute__((__format__(__printf__, 1, 2)))
6715VALUE rb_sprintf(const char *fmt, ...);
6716__attribute__((__nonnull__ (1)))
6717__attribute__((__format__(__printf__, 1, 0)))
6718VALUE rb_vsprintf(const char *fmt, va_list ap);
6719__attribute__((__nonnull__ (2)))
6720__attribute__((__format__(__printf__, 2, 3)))
6721VALUE rb_str_catf(VALUE dst, const char *fmt, ...);
6722__attribute__((__nonnull__ (2)))
6723__attribute__((__format__(__printf__, 2, 0)))
6724VALUE rb_str_vcatf(VALUE dst, const char *fmt, va_list ap);
6725VALUE rb_str_format(int argc, const VALUE *argv, VALUE fmt);
6726
6727
6728
6729
6730VALUE rb_str_new(const char *ptr, long len);
6731VALUE rb_str_new_cstr(const char *ptr);
6732VALUE rb_str_new_shared(VALUE str);
6733VALUE rb_str_new_frozen(VALUE str);
6734VALUE rb_str_new_with_class(VALUE obj, const char *ptr, long len);
6735VALUE rb_external_str_new(const char *ptr, long len);
6736__attribute__((__nonnull__ ()))
6737VALUE rb_external_str_new_cstr(const char *ptr);
6738VALUE rb_locale_str_new(const char *ptr, long len);
6739__attribute__((__nonnull__ ()))
6740VALUE rb_locale_str_new_cstr(const char *ptr);
6741VALUE rb_filesystem_str_new(const char *ptr, long len);
6742__attribute__((__nonnull__ ()))
6743VALUE rb_filesystem_str_new_cstr(const char *ptr);
6744VALUE rb_str_buf_new(long capa);
6745__attribute__((__nonnull__ ()))
6746VALUE rb_str_buf_new_cstr(const char *ptr);
6747VALUE rb_str_tmp_new(long len);
6748VALUE rb_usascii_str_new(const char *ptr, long len);
6749VALUE rb_usascii_str_new_cstr(const char *ptr);
6750VALUE rb_utf8_str_new(const char *ptr, long len);
6751VALUE rb_utf8_str_new_cstr(const char *ptr);
6752VALUE rb_str_new_static(const char *ptr, long len);
6753VALUE rb_usascii_str_new_static(const char *ptr, long len);
6754VALUE rb_utf8_str_new_static(const char *ptr, long len);
6755VALUE rb_str_to_interned_str(VALUE str);
6756VALUE rb_interned_str(const char *ptr, long len);
6757__attribute__((__nonnull__ ()))
6758VALUE rb_interned_str_cstr(const char *ptr);
6759void rb_str_free(VALUE str);
6760void rb_str_shared_replace(VALUE dst, VALUE src);
6761VALUE rb_str_buf_append(VALUE dst, VALUE src);
6762VALUE rb_str_buf_cat(VALUE, const char*, long);
6763VALUE rb_str_buf_cat2(VALUE, const char*);
6764__attribute__((__nonnull__ ()))
6765VALUE rb_str_buf_cat_ascii(VALUE dst, const char *src);
6766VALUE rb_obj_as_string(VALUE obj);
6767VALUE rb_check_string_type(VALUE obj);
6768void rb_must_asciicompat(VALUE obj);
6769VALUE rb_str_dup(VALUE str);
6770VALUE rb_str_resurrect(VALUE str);
6771VALUE rb_str_locktmp(VALUE str);
6772VALUE rb_str_unlocktmp(VALUE str);
6773VALUE rb_str_dup_frozen(VALUE);
6774VALUE rb_str_plus(VALUE lhs, VALUE rhs);
6775VALUE rb_str_times(VALUE str, VALUE num);
6776long rb_str_sublen(VALUE str, long pos);
6777VALUE rb_str_substr(VALUE str, long beg, long len);
6778VALUE rb_str_subseq(VALUE str, long beg, long len);
6779char *rb_str_subpos(VALUE str, long beg, long *len);
6780void rb_str_modify(VALUE str);
6781void rb_str_modify_expand(VALUE str, long capa);
6782VALUE rb_str_freeze(VALUE str);
6783void rb_str_set_len(VALUE str, long len);
6784VALUE rb_str_resize(VALUE str, long len);
6785VALUE rb_str_cat(VALUE dst, const char *src, long srclen);
6786VALUE rb_str_cat_cstr(VALUE dst, const char *src);
6787VALUE rb_str_cat2(VALUE, const char*);
6788VALUE rb_str_append(VALUE dst, VALUE src);
6789VALUE rb_str_concat(VALUE dst, VALUE src);
6790st_index_t rb_memhash(const void *ptr, long len);
6791st_index_t rb_hash_start(st_index_t i);
6792st_index_t rb_str_hash(VALUE str);
6793int rb_str_hash_cmp(VALUE str1, VALUE str2);
6794int rb_str_comparable(VALUE str1, VALUE str2);
6795int rb_str_cmp(VALUE lhs, VALUE rhs);
6796VALUE rb_str_equal(VALUE str1, VALUE str2);
6797VALUE rb_str_drop_bytes(VALUE str, long len);
6798void rb_str_update(VALUE dst, long beg, long len, VALUE src);
6799VALUE rb_str_replace(VALUE dst, VALUE src);
6800VALUE rb_str_inspect(VALUE str);
6801VALUE rb_str_dump(VALUE str);
6802VALUE rb_str_split(VALUE str, const char *delim);
6803rb_gvar_setter_t rb_str_setter;
6804VALUE rb_str_intern(VALUE str);
6805VALUE rb_sym_to_s(VALUE sym);
6806long rb_str_strlen(VALUE str);
6807VALUE rb_str_length(VALUE);
6808long rb_str_offset(VALUE str, long pos);
6809__attribute__((__pure__))
6810size_t rb_str_capacity(VALUE str);
6811VALUE rb_str_ellipsize(VALUE str, long len);
6812VALUE rb_str_scrub(VALUE str, VALUE repl);
6813VALUE rb_str_succ(VALUE orig);
6814__attribute__((__nonnull__ ()))
6815static inline long
6816rbimpl_strlen(const char *str)
6817{
6818 return ((long)strlen(str));
6819}
6820__attribute__((__nonnull__ ()))
6821static inline VALUE
6822rbimpl_str_new_cstr(const char *str)
6823{
6824 long len = rbimpl_strlen(str);
6825 return rb_str_new_static(str, len);
6826}
6827__attribute__((__nonnull__ ()))
6828static inline VALUE
6829rbimpl_usascii_str_new_cstr(const char *str)
6830{
6831 long len = rbimpl_strlen(str);
6832 return rb_usascii_str_new_static(str, len);
6833}
6834__attribute__((__nonnull__ ()))
6835static inline VALUE
6836rbimpl_utf8_str_new_cstr(const char *str)
6837{
6838 long len = rbimpl_strlen(str);
6839 return rb_utf8_str_new_static(str, len);
6840}
6841__attribute__((__nonnull__ ()))
6842static inline VALUE
6843rbimpl_external_str_new_cstr(const char *str)
6844{
6845 long len = rbimpl_strlen(str);
6846 return rb_external_str_new(str, len);
6847}
6848__attribute__((__nonnull__ ()))
6849static inline VALUE
6850rbimpl_locale_str_new_cstr(const char *str)
6851{
6852 long len = rbimpl_strlen(str);
6853 return rb_locale_str_new(str, len);
6854}
6855__attribute__((__nonnull__ ()))
6856static inline VALUE
6857rbimpl_str_buf_new_cstr(const char *str)
6858{
6859 long len = rbimpl_strlen(str);
6860 VALUE buf = rb_str_buf_new(len);
6861 return rb_str_buf_cat(buf, str, len);
6862}
6863__attribute__((__nonnull__ ()))
6864static inline VALUE
6865rbimpl_str_cat_cstr(VALUE buf, const char *str)
6866{
6867 long len = rbimpl_strlen(str);
6868 return rb_str_cat(buf, str, len);
6869}
6870__attribute__((__nonnull__ ()))
6871static inline VALUE
6872rbimpl_exc_new_cstr(VALUE exc, const char *str)
6873{
6874 long len = rbimpl_strlen(str);
6875 return rb_exc_new(exc, str, len);
6876}
6877
6878
6879
6880
6881VALUE rb_struct_new(VALUE klass, ...);
6882VALUE rb_struct_define(const char *name, ...);
6883__attribute__((__nonnull__ (2)))
6884VALUE rb_struct_define_under(VALUE space, const char *name, ...);
6885VALUE rb_struct_alloc(VALUE klass, VALUE values);
6886VALUE rb_struct_initialize(VALUE self, VALUE values);
6887VALUE rb_struct_getmember(VALUE self, ID key);
6888VALUE rb_struct_s_members(VALUE klass);
6889VALUE rb_struct_members(VALUE self);
6890VALUE rb_struct_alloc_noinit(VALUE klass);
6891VALUE rb_struct_define_without_accessor(const char *name, VALUE super, rb_alloc_func_t func, ...);
6892__attribute__((__nonnull__ (2)))
6893VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc, ...);
6894
6895
6896
6897
6898struct timeval;
6899void rb_thread_schedule(void);
6900int rb_thread_wait_fd(int fd);
6901int rb_thread_fd_writable(int fd);
6902void rb_thread_fd_close(int fd);
6903int rb_thread_alone(void);
6904void rb_thread_sleep(int sec);
6905void rb_thread_sleep_forever(void);
6906void rb_thread_sleep_deadly(void);
6907VALUE rb_thread_stop(void);
6908VALUE rb_thread_wakeup(VALUE thread);
6909VALUE rb_thread_wakeup_alive(VALUE thread);
6910VALUE rb_thread_run(VALUE thread);
6911VALUE rb_thread_kill(VALUE thread);
6912__attribute__((__nonnull__ (1)))
6913VALUE rb_thread_create(VALUE (*f)(void *g), void *g);
6914void rb_thread_wait_for(struct timeval time);
6915VALUE rb_thread_current(void);
6916VALUE rb_thread_main(void);
6917VALUE rb_thread_local_aref(VALUE thread, ID key);
6918VALUE rb_thread_local_aset(VALUE thread, ID key, VALUE val);
6919void rb_thread_atfork(void);
6920void rb_thread_atfork_before_exec(void);
6921VALUE rb_exec_recursive(VALUE (*f)(VALUE g, VALUE h, int r), VALUE g, VALUE h);
6922VALUE rb_exec_recursive_paired(VALUE (*f)(VALUE g, VALUE h, int r), VALUE g, VALUE p, VALUE h);
6923VALUE rb_exec_recursive_outer_mid(VALUE (*f)(VALUE g, VALUE h, int r), VALUE g, VALUE h, ID mid);
6924VALUE rb_exec_recursive_paired_outer(VALUE (*f)(VALUE g, VALUE h, int r), VALUE g, VALUE p, VALUE h);
6925typedef void rb_unblock_function_t(void *);
6926typedef VALUE rb_blocking_function_t(void *);
6927void rb_thread_check_ints(void);
6928int rb_thread_interrupted(VALUE thval);
6929VALUE rb_mutex_new(void);
6930VALUE rb_mutex_locked_p(VALUE mutex);
6931VALUE rb_mutex_trylock(VALUE mutex);
6932VALUE rb_mutex_lock(VALUE mutex);
6933VALUE rb_mutex_unlock(VALUE mutex);
6934VALUE rb_mutex_sleep(VALUE self, VALUE timeout);
6935VALUE rb_mutex_synchronize(VALUE mutex, VALUE (*func)(VALUE arg), VALUE arg);
6936
6937
6938
6939
6940struct timespec;
6941struct timeval;
6942__attribute__((__nonnull__ ()))
6943void rb_timespec_now(struct timespec *ts);
6944VALUE rb_time_new(time_t sec, long usec);
6945VALUE rb_time_nano_new(time_t sec, long nsec);
6946__attribute__((__nonnull__ ()))
6947VALUE rb_time_timespec_new(const struct timespec *ts, int offset);
6948VALUE rb_time_num_new(VALUE timev, VALUE off);
6949struct timeval rb_time_interval(VALUE num);
6950struct timeval rb_time_timeval(VALUE time);
6951struct timespec rb_time_timespec(VALUE time);
6952struct timespec rb_time_timespec_interval(VALUE num);
6953VALUE rb_time_utc_offset(VALUE time);
6954
6955
6956
6957
6958VALUE rb_mod_name(VALUE mod);
6959VALUE rb_class_path(VALUE mod);
6960VALUE rb_class_path_cached(VALUE mod);
6961__attribute__((__nonnull__ ()))
6962void rb_set_class_path(VALUE klass, VALUE space, const char *name);
6963void rb_set_class_path_string(VALUE klass, VALUE space, VALUE name);
6964VALUE rb_path_to_class(VALUE path);
6965__attribute__((__nonnull__ ()))
6966VALUE rb_path2class(const char *path);
6967VALUE rb_class_name(VALUE obj);
6968VALUE rb_autoload_load(VALUE space, ID name);
6969VALUE rb_autoload_p(VALUE space, ID name);
6970VALUE rb_f_trace_var(int argc, const VALUE *argv);
6971VALUE rb_f_untrace_var(int argc, const VALUE *argv);
6972VALUE rb_f_global_variables(void);
6973void rb_alias_variable(ID dst, ID src);
6974void rb_free_generic_ivar(VALUE obj);
6975VALUE rb_ivar_get(VALUE obj, ID name);
6976VALUE rb_ivar_set(VALUE obj, ID name, VALUE val);
6977VALUE rb_ivar_defined(VALUE obj, ID name);
6978void rb_ivar_foreach(VALUE obj, int (*func)(ID name, VALUE val, st_data_t arg), st_data_t arg);
6979st_index_t rb_ivar_count(VALUE obj);
6980VALUE rb_attr_get(VALUE obj, ID name);
6981VALUE rb_obj_instance_variables(VALUE obj);
6982VALUE rb_obj_remove_instance_variable(VALUE obj, VALUE name);
6983void *rb_mod_const_at(VALUE, void*);
6984void *rb_mod_const_of(VALUE, void*);
6985VALUE rb_const_list(void*);
6986VALUE rb_mod_constants(int argc, const VALUE *argv, VALUE recv);
6987VALUE rb_mod_remove_const(VALUE space, VALUE name);
6988int rb_const_defined(VALUE space, ID name);
6989int rb_const_defined_at(VALUE space, ID name);
6990int rb_const_defined_from(VALUE space, ID name);
6991VALUE rb_const_get(VALUE space, ID name);
6992VALUE rb_const_get_at(VALUE space, ID name);
6993VALUE rb_const_get_from(VALUE space, ID name);
6994void rb_const_set(VALUE space, ID name, VALUE val);
6995VALUE rb_const_remove(VALUE space, ID name);
6996VALUE rb_cvar_defined(VALUE klass, ID name);
6997void rb_cvar_set(VALUE klass, ID name, VALUE val);
6998VALUE rb_cvar_get(VALUE klass, ID name);
6999__attribute__((__nonnull__ ()))
7000VALUE rb_cvar_find(VALUE klass, ID name, VALUE *front);
7001__attribute__((__nonnull__ ()))
7002void rb_cv_set(VALUE klass, const char *name, VALUE val);
7003__attribute__((__nonnull__ ()))
7004VALUE rb_cv_get(VALUE klass, const char *name);
7005__attribute__((__nonnull__ ()))
7006void rb_define_class_variable(VALUE, const char*, VALUE);
7007VALUE rb_mod_class_variables(int argc, const VALUE *argv, VALUE recv);
7008VALUE rb_mod_remove_cvar(VALUE mod, VALUE name);
7009
7010
7011int ruby_native_thread_p(void);
7012__attribute__((__nonnull__ (3)))
7013__attribute__((__format__(__printf__, 3, 4)))
7014int ruby_snprintf(char *str, size_t n, char const *fmt, ...);
7015__attribute__((__nonnull__ (3)))
7016__attribute__((__format__(__printf__, 3, 0)))
7017int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
7018
7019
7020
7021typedef __sig_atomic_t sig_atomic_t;
7022union sigval
7023{
7024 int sival_int;
7025 void *sival_ptr;
7026};
7027typedef union sigval __sigval_t;
7028typedef struct
7029 {
7030 int si_signo;
7031 int si_errno;
7032 int si_code;
7033 int __pad0;
7034 union
7035 {
7036 int _pad[((128 / sizeof (int)) - 4)];
7037 struct
7038 {
7039 __pid_t si_pid;
7040 __uid_t si_uid;
7041 } _kill;
7042 struct
7043 {
7044 int si_tid;
7045 int si_overrun;
7046 __sigval_t si_sigval;
7047 } _timer;
7048 struct
7049 {
7050 __pid_t si_pid;
7051 __uid_t si_uid;
7052 __sigval_t si_sigval;
7053 } _rt;
7054 struct
7055 {
7056 __pid_t si_pid;
7057 __uid_t si_uid;
7058 int si_status;
7059 __clock_t si_utime;
7060 __clock_t si_stime;
7061 } _sigchld;
7062 struct
7063 {
7064 void *si_addr;
7065
7066 short int si_addr_lsb;
7067 union
7068 {
7069 struct
7070 {
7071 void *_lower;
7072 void *_upper;
7073 } _addr_bnd;
7074 __uint32_t _pkey;
7075 } _bounds;
7076 } _sigfault;
7077 struct
7078 {
7079 long int si_band;
7080 int si_fd;
7081 } _sigpoll;
7082 struct
7083 {
7084 void *_call_addr;
7085 int _syscall;
7086 unsigned int _arch;
7087 } _sigsys;
7088 } _sifields;
7089 } siginfo_t ;
7090enum
7091{
7092 SI_ASYNCNL = -60,
7093 SI_DETHREAD = -7,
7094 SI_TKILL,
7095 SI_SIGIO,
7096 SI_ASYNCIO,
7097 SI_MESGQ,
7098 SI_TIMER,
7099 SI_QUEUE,
7100 SI_USER,
7101 SI_KERNEL = 0x80
7102};
7103enum
7104{
7105 ILL_ILLOPC = 1,
7106 ILL_ILLOPN,
7107 ILL_ILLADR,
7108 ILL_ILLTRP,
7109 ILL_PRVOPC,
7110 ILL_PRVREG,
7111 ILL_COPROC,
7112 ILL_BADSTK,
7113 ILL_BADIADDR
7114};
7115enum
7116{
7117 FPE_INTDIV = 1,
7118 FPE_INTOVF,
7119 FPE_FLTDIV,
7120 FPE_FLTOVF,
7121 FPE_FLTUND,
7122 FPE_FLTRES,
7123 FPE_FLTINV,
7124 FPE_FLTSUB,
7125 FPE_FLTUNK = 14,
7126 FPE_CONDTRAP
7127};
7128enum
7129{
7130 SEGV_MAPERR = 1,
7131 SEGV_ACCERR,
7132 SEGV_BNDERR,
7133 SEGV_PKUERR,
7134 SEGV_ACCADI,
7135 SEGV_ADIDERR,
7136 SEGV_ADIPERR,
7137 SEGV_MTEAERR,
7138 SEGV_MTESERR
7139};
7140enum
7141{
7142 BUS_ADRALN = 1,
7143 BUS_ADRERR,
7144 BUS_OBJERR,
7145 BUS_MCEERR_AR,
7146 BUS_MCEERR_AO
7147};
7148enum
7149{
7150 TRAP_BRKPT = 1,
7151 TRAP_TRACE,
7152 TRAP_BRANCH,
7153 TRAP_HWBKPT,
7154 TRAP_UNK
7155};
7156enum
7157{
7158 CLD_EXITED = 1,
7159 CLD_KILLED,
7160 CLD_DUMPED,
7161 CLD_TRAPPED,
7162 CLD_STOPPED,
7163 CLD_CONTINUED
7164};
7165enum
7166{
7167 POLL_IN = 1,
7168 POLL_OUT,
7169 POLL_MSG,
7170 POLL_ERR,
7171 POLL_PRI,
7172 POLL_HUP
7173};
7174typedef __sigval_t sigval_t;
7175typedef struct sigevent
7176 {
7177 __sigval_t sigev_value;
7178 int sigev_signo;
7179 int sigev_notify;
7180 union
7181 {
7182 int _pad[((64 / sizeof (int)) - 4)];
7183 __pid_t _tid;
7184 struct
7185 {
7186 void (*_function) (__sigval_t);
7187 pthread_attr_t *_attribute;
7188 } _sigev_thread;
7189 } _sigev_un;
7190 } sigevent_t;
7191enum
7192{
7193 SIGEV_SIGNAL = 0,
7194 SIGEV_NONE,
7195 SIGEV_THREAD,
7196 SIGEV_THREAD_ID = 4
7197};
7198typedef void (*__sighandler_t) (int);
7199extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
7200 __attribute__ ((__nothrow__ , __leaf__));
7201extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler)
7202 __attribute__ ((__nothrow__ , __leaf__));
7203extern __sighandler_t signal (int __sig, __sighandler_t __handler)
7204 __attribute__ ((__nothrow__ , __leaf__));
7205extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__ , __leaf__));
7206extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__ , __leaf__));
7207extern int raise (int __sig) __attribute__ ((__nothrow__ , __leaf__));
7208extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
7209 __attribute__ ((__nothrow__ , __leaf__));
7210extern int gsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__));
7211extern void psignal (int __sig, const char *__s);
7212extern void psiginfo (const siginfo_t *__pinfo, const char *__s);
7213extern int sigpause (int __sig) __asm__ ("__xpg_sigpause")
7214 __attribute__ ((__deprecated__ ("Use the sigsuspend function instead")));
7215extern int sigblock (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
7216extern int sigsetmask (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
7217extern int siggetmask (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
7218typedef __sighandler_t sighandler_t;
7219typedef __sighandler_t sig_t;
7220extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7221extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7222extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7223extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7224extern int sigismember (const sigset_t *__set, int __signo)
7225 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7226extern int sigisemptyset (const sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7227extern int sigandset (sigset_t *__set, const sigset_t *__left,
7228 const sigset_t *__right) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3)));
7229extern int sigorset (sigset_t *__set, const sigset_t *__left,
7230 const sigset_t *__right) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3)));
7231struct sigaction
7232 {
7233 union
7234 {
7235 __sighandler_t sa_handler;
7236 void (*sa_sigaction) (int, siginfo_t *, void *);
7237 }
7238 __sigaction_handler;
7239 __sigset_t sa_mask;
7240 int sa_flags;
7241 void (*sa_restorer) (void);
7242 };
7243extern int sigprocmask (int __how, const sigset_t *__restrict __set,
7244 sigset_t *__restrict __oset) __attribute__ ((__nothrow__ , __leaf__));
7245extern int sigsuspend (const sigset_t *__set) __attribute__ ((__nonnull__ (1)));
7246extern int sigaction (int __sig, const struct sigaction *__restrict __act,
7247 struct sigaction *__restrict __oact) __attribute__ ((__nothrow__ , __leaf__));
7248extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7249extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig)
7250 __attribute__ ((__nonnull__ (1, 2)));
7251extern int sigwaitinfo (const sigset_t *__restrict __set,
7252 siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1)));
7253extern int sigtimedwait (const sigset_t *__restrict __set,
7254 siginfo_t *__restrict __info,
7255 const struct timespec *__restrict __timeout)
7256 __attribute__ ((__nonnull__ (1)));
7257extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val)
7258 __attribute__ ((__nothrow__ , __leaf__));
7259struct _fpx_sw_bytes
7260{
7261 __uint32_t magic1;
7262 __uint32_t extended_size;
7263 __uint64_t xstate_bv;
7264 __uint32_t xstate_size;
7265 __uint32_t __glibc_reserved1[7];
7266};
7267struct _fpreg
7268{
7269 unsigned short significand[4];
7270 unsigned short exponent;
7271};
7272struct _fpxreg
7273{
7274 unsigned short significand[4];
7275 unsigned short exponent;
7276 unsigned short __glibc_reserved1[3];
7277};
7278struct _xmmreg
7279{
7280 __uint32_t element[4];
7281};
7282struct _fpstate
7283{
7284 __uint16_t cwd;
7285 __uint16_t swd;
7286 __uint16_t ftw;
7287 __uint16_t fop;
7288 __uint64_t rip;
7289 __uint64_t rdp;
7290 __uint32_t mxcsr;
7291 __uint32_t mxcr_mask;
7292 struct _fpxreg _st[8];
7293 struct _xmmreg _xmm[16];
7294 __uint32_t __glibc_reserved1[24];
7295};
7296struct sigcontext
7297{
7298 __uint64_t r8;
7299 __uint64_t r9;
7300 __uint64_t r10;
7301 __uint64_t r11;
7302 __uint64_t r12;
7303 __uint64_t r13;
7304 __uint64_t r14;
7305 __uint64_t r15;
7306 __uint64_t rdi;
7307 __uint64_t rsi;
7308 __uint64_t rbp;
7309 __uint64_t rbx;
7310 __uint64_t rdx;
7311 __uint64_t rax;
7312 __uint64_t rcx;
7313 __uint64_t rsp;
7314 __uint64_t rip;
7315 __uint64_t eflags;
7316 unsigned short cs;
7317 unsigned short gs;
7318 unsigned short fs;
7319 unsigned short __pad0;
7320 __uint64_t err;
7321 __uint64_t trapno;
7322 __uint64_t oldmask;
7323 __uint64_t cr2;
7324 __extension__ union
7325 {
7326 struct _fpstate * fpstate;
7327 __uint64_t __fpstate_word;
7328 };
7329 __uint64_t __reserved1 [8];
7330};
7331struct _xsave_hdr
7332{
7333 __uint64_t xstate_bv;
7334 __uint64_t __glibc_reserved1[2];
7335 __uint64_t __glibc_reserved2[5];
7336};
7337struct _ymmh_state
7338{
7339 __uint32_t ymmh_space[64];
7340};
7341struct _xstate
7342{
7343 struct _fpstate fpstate;
7344 struct _xsave_hdr xstate_hdr;
7345 struct _ymmh_state ymmh;
7346};
7347extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__ , __leaf__));
7348typedef struct
7349 {
7350 void *ss_sp;
7351 int ss_flags;
7352 size_t ss_size;
7353 } stack_t;
7354__extension__ typedef long long int greg_t;
7355typedef greg_t gregset_t[23];
7356enum
7357{
7358 REG_R8 = 0,
7359 REG_R9,
7360 REG_R10,
7361 REG_R11,
7362 REG_R12,
7363 REG_R13,
7364 REG_R14,
7365 REG_R15,
7366 REG_RDI,
7367 REG_RSI,
7368 REG_RBP,
7369 REG_RBX,
7370 REG_RDX,
7371 REG_RAX,
7372 REG_RCX,
7373 REG_RSP,
7374 REG_RIP,
7375 REG_EFL,
7376 REG_CSGSFS,
7377 REG_ERR,
7378 REG_TRAPNO,
7379 REG_OLDMASK,
7380 REG_CR2
7381};
7382struct _libc_fpxreg
7383{
7384 unsigned short int significand[4];
7385 unsigned short int exponent;
7386 unsigned short int __glibc_reserved1[3];
7387};
7388struct _libc_xmmreg
7389{
7390 __uint32_t element[4];
7391};
7392struct _libc_fpstate
7393{
7394 __uint16_t cwd;
7395 __uint16_t swd;
7396 __uint16_t ftw;
7397 __uint16_t fop;
7398 __uint64_t rip;
7399 __uint64_t rdp;
7400 __uint32_t mxcsr;
7401 __uint32_t mxcr_mask;
7402 struct _libc_fpxreg _st[8];
7403 struct _libc_xmmreg _xmm[16];
7404 __uint32_t __glibc_reserved1[24];
7405};
7406typedef struct _libc_fpstate *fpregset_t;
7407typedef struct
7408 {
7409 gregset_t gregs;
7410 fpregset_t fpregs;
7411 __extension__ unsigned long long __reserved1 [8];
7412} mcontext_t;
7413typedef struct ucontext_t
7414 {
7415 unsigned long int uc_flags;
7416 struct ucontext_t *uc_link;
7417 stack_t uc_stack;
7418 mcontext_t uc_mcontext;
7419 sigset_t uc_sigmask;
7420 struct _libc_fpstate __fpregs_mem;
7421 __extension__ unsigned long long int __ssp[4];
7422 } ucontext_t;
7423extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__ , __leaf__))
7424 __attribute__ ((__deprecated__ ("Use sigaction with SA_RESTART instead")));
7425enum
7426{
7427 SS_ONSTACK = 1,
7428 SS_DISABLE
7429};
7430extern int sigaltstack (const stack_t *__restrict __ss,
7431 stack_t *__restrict __oss) __attribute__ ((__nothrow__ , __leaf__));
7432struct sigstack
7433 {
7434 void *ss_sp;
7435 int ss_onstack;
7436 };
7437extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
7438 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
7439extern int sighold (int __sig) __attribute__ ((__nothrow__ , __leaf__))
7440 __attribute__ ((__deprecated__ ("Use the sigprocmask function instead")));
7441extern int sigrelse (int __sig) __attribute__ ((__nothrow__ , __leaf__))
7442 __attribute__ ((__deprecated__ ("Use the sigprocmask function instead")));
7443extern int sigignore (int __sig) __attribute__ ((__nothrow__ , __leaf__))
7444 __attribute__ ((__deprecated__ ("Use the signal function instead")));
7445extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __attribute__ ((__nothrow__ , __leaf__))
7446 __attribute__ ((__deprecated__ ("Use the signal and sigprocmask functions instead")));
7447extern int pthread_sigmask (int __how,
7448 const __sigset_t *__restrict __newmask,
7449 __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__ , __leaf__));
7450extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__ , __leaf__));
7451extern int pthread_sigqueue (pthread_t __threadid, int __signo,
7452 const union sigval __value) __attribute__ ((__nothrow__ , __leaf__));
7453extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__ , __leaf__));
7454extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__ , __leaf__));
7455extern int tgkill (__pid_t __tgid, __pid_t __tid, int __signal);
7456
7457
7458typedef long int __jmp_buf[8];
7459struct __jmp_buf_tag
7460 {
7461 __jmp_buf __jmpbuf;
7462 int __mask_was_saved;
7463 __sigset_t __saved_mask;
7464 };
7465typedef struct __jmp_buf_tag jmp_buf[1];
7466extern int setjmp (jmp_buf __env) __attribute__ ((__nothrow__));
7467extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __attribute__ ((__nothrow__));
7468extern int _setjmp (struct __jmp_buf_tag __env[1]) __attribute__ ((__nothrow__));
7469extern void longjmp (struct __jmp_buf_tag __env[1], int __val)
7470 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7471extern void _longjmp (struct __jmp_buf_tag __env[1], int __val)
7472 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7473typedef struct __jmp_buf_tag sigjmp_buf[1];
7474extern void siglongjmp (sigjmp_buf __env, int __val)
7475 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7476extern void longjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7477extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7478extern void siglongjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7479
7480static inline char *container_of_or_null_(void *member_ptr, size_t offset)
7481{
7482 return member_ptr ? (char *)member_ptr - offset : ((void *)0);
7483}
7484struct ccan_list_node
7485{
7486 struct ccan_list_node *next, *prev;
7487};
7488struct ccan_list_head
7489{
7490 struct ccan_list_node n;
7491};
7492static inline void ccan_list_head_init(struct ccan_list_head *h)
7493{
7494 h->n.next = h->n.prev = &h->n;
7495}
7496static inline void ccan_list_node_init(struct ccan_list_node *n)
7497{
7498 n->next = n->prev = n;
7499}
7500static inline void ccan_list_add_after_(struct ccan_list_head *h,
7501 struct ccan_list_node *p,
7502 struct ccan_list_node *n,
7503 const char *abortstr)
7504{
7505 n->next = p->next;
7506 n->prev = p;
7507 p->next->prev = n;
7508 p->next = n;
7509 (void)((void)abortstr, h);
7510}
7511static inline void ccan_list_add_(struct ccan_list_head *h,
7512 struct ccan_list_node *n,
7513 const char *abortstr)
7514{
7515 ccan_list_add_after_(h, &h->n, n, abortstr);
7516}
7517static inline void ccan_list_add_before_(struct ccan_list_head *h,
7518 struct ccan_list_node *p,
7519 struct ccan_list_node *n,
7520 const char *abortstr)
7521{
7522 n->next = p;
7523 n->prev = p->prev;
7524 p->prev->next = n;
7525 p->prev = n;
7526 (void)((void)abortstr, h);
7527}
7528static inline void ccan_list_add_tail_(struct ccan_list_head *h,
7529 struct ccan_list_node *n,
7530 const char *abortstr)
7531{
7532 ccan_list_add_before_(h, &h->n, n, abortstr);
7533}
7534static inline int ccan_list_empty_(const struct ccan_list_head *h, const char* abortstr)
7535{
7536 (void)((void)abortstr, h);
7537 return h->n.next == &h->n;
7538}
7539static inline _Bool ccan_list_empty_nocheck(const struct ccan_list_head *h)
7540{
7541 return h->n.next == &h->n;
7542}
7543static inline void ccan_list_del_(struct ccan_list_node *n, const char* abortstr)
7544{
7545 (void)((void)abortstr, n);
7546 n->next->prev = n->prev;
7547 n->prev->next = n->next;
7548}
7549static inline void ccan_list_del_init_(struct ccan_list_node *n, const char *abortstr)
7550{
7551 ccan_list_del_(n, abortstr);
7552 ccan_list_node_init(n);
7553}
7554static inline void ccan_list_del_from(struct ccan_list_head *h, struct ccan_list_node *n)
7555{
7556 ((void) (0));
7557 ccan_list_del_(n, "./ccan/list/list.h" ":" "329");
7558}
7559static inline void ccan_list_swap_(struct ccan_list_node *o,
7560 struct ccan_list_node *n,
7561 const char* abortstr)
7562{
7563 (void)((void)abortstr, o);
7564 *n = *o;
7565 n->next->prev = n;
7566 n->prev->next = n;
7567}
7568static inline const void *ccan_list_top_(const struct ccan_list_head *h, size_t off)
7569{
7570 if (ccan_list_empty_(h, "./ccan/list/list.h" ":" "399"))
7571 return ((void *)0);
7572 return (const char *)h->n.next - off;
7573}
7574static inline const void *ccan_list_pop_(const struct ccan_list_head *h, size_t off)
7575{
7576 struct ccan_list_node *n;
7577 if (ccan_list_empty_(h, "./ccan/list/list.h" ":" "425"))
7578 return ((void *)0);
7579 n = h->n.next;
7580 ccan_list_del_(n, "./ccan/list/list.h" ":" "428");
7581 return (const char *)n - off;
7582}
7583static inline const void *ccan_list_tail_(const struct ccan_list_head *h, size_t off)
7584{
7585 if (ccan_list_empty_(h, "./ccan/list/list.h" ":" "451"))
7586 return ((void *)0);
7587 return (const char *)h->n.prev - off;
7588}
7589static inline void ccan_list_append_list_(struct ccan_list_head *to,
7590 struct ccan_list_head *from,
7591 const char *abortstr)
7592{
7593 struct ccan_list_node *from_tail = ((void)abortstr, from)->n.prev;
7594 struct ccan_list_node *to_tail = ((void)abortstr, to)->n.prev;
7595 to->n.prev = from_tail;
7596 from_tail->next = &to->n;
7597 to_tail->next = &from->n;
7598 from->n.prev = to_tail;
7599 ccan_list_del_(&from->n, "./ccan/list/list.h" ":" "600");
7600 ccan_list_head_init(from);
7601}
7602static inline void ccan_list_prepend_list_(struct ccan_list_head *to,
7603 struct ccan_list_head *from,
7604 const char *abortstr)
7605{
7606 struct ccan_list_node *from_tail = ((void)abortstr, from)->n.prev;
7607 struct ccan_list_node *to_head = ((void)abortstr, to)->n.next;
7608 to->n.next = &from->n;
7609 from->n.prev = &to->n;
7610 to_head->prev = from_tail;
7611 from_tail->next = to_head;
7612 ccan_list_del_(&from->n, "./ccan/list/list.h" ":" "632");
7613 ccan_list_head_init(from);
7614}
7615static inline void *ccan_list_node_to_off_(struct ccan_list_node *node, size_t off)
7616{
7617 return (void *)((char *)node - off);
7618}
7619static inline struct ccan_list_node *ccan_list_node_from_off_(void *ptr, size_t off)
7620{
7621 return (struct ccan_list_node *)((char *)ptr + off);
7622}
7623static inline void *ccan_list_entry_or_null(const struct ccan_list_head *h,
7624 const struct ccan_list_node *n,
7625 size_t off)
7626{
7627 if (n == &h->n)
7628 return ((void *)0);
7629 return (char *)n - off;
7630}
7631enum ruby_id_types {
7632 RUBY_ID_STATIC_SYM = 0x01,
7633 RUBY_ID_LOCAL = 0x00,
7634 RUBY_ID_INSTANCE = (0x01<<1),
7635 RUBY_ID_GLOBAL = (0x03<<1),
7636 RUBY_ID_ATTRSET = (0x04<<1),
7637 RUBY_ID_CONST = (0x05<<1),
7638 RUBY_ID_CLASS = (0x06<<1),
7639 RUBY_ID_JUNK = (0x07<<1),
7640 RUBY_ID_INTERNAL = RUBY_ID_JUNK,
7641 RUBY_ID_SCOPE_SHIFT = 4,
7642 RUBY_ID_SCOPE_MASK = (~(~0U<<(RUBY_ID_SCOPE_SHIFT-1))<<1)
7643};
7644enum ruby_method_ids {
7645 idDot2 = 128,
7646 idDot3 = 129,
7647 idUPlus = 132,
7648 idUMinus = 133,
7649 idPow = 134,
7650 idCmp = 135,
7651 idPLUS = '+',
7652 idMINUS = '-',
7653 idMULT = '*',
7654 idDIV = '/',
7655 idMOD = '%',
7656 idLTLT = 136,
7657 idGTGT = 137,
7658 idLT = '<',
7659 idLE = 138,
7660 idGT = '>',
7661 idGE = 139,
7662 idEq = 140,
7663 idEqq = 141,
7664 idNeq = 142,
7665 idNot = '!',
7666 idAnd = '&',
7667 idOr = '|',
7668 idBackquote = '`',
7669 idEqTilde = 143,
7670 idNeqTilde = 144,
7671 idAREF = 145,
7672 idASET = 146,
7673 idCOLON2 = 147,
7674 idANDOP = 148,
7675 idOROP = 149,
7676 idANDDOT = 150,
7677 tPRESERVED_ID_BEGIN = 150,
7678 idNilP,
7679 idNULL,
7680 idEmptyP,
7681 idEqlP,
7682 idRespond_to,
7683 idRespond_to_missing,
7684 idIFUNC,
7685 idCFUNC,
7686 id_core_set_method_alias,
7687 id_core_set_variable_alias,
7688 id_core_undef_method,
7689 id_core_define_method,
7690 id_core_define_singleton_method,
7691 id_core_set_postexe,
7692 id_core_hash_merge_ptr,
7693 id_core_hash_merge_kwd,
7694 id_core_raise,
7695 id_core_sprintf,
7696 id_debug_created_info,
7697 tPRESERVED_ID_END,
7698 tTOKEN_LOCAL_BEGIN = tPRESERVED_ID_END-1,
7699 tMax,
7700 tMin,
7701 tHash,
7702 tFreeze,
7703 tInspect,
7704 tIntern,
7705 tObject_id,
7706 tConst_added,
7707 tConst_missing,
7708 tMethodMissing,
7709 tMethod_added,
7710 tSingleton_method_added,
7711 tMethod_removed,
7712 tSingleton_method_removed,
7713 tMethod_undefined,
7714 tSingleton_method_undefined,
7715 tLength,
7716 tSize,
7717 tGets,
7718 tSucc,
7719 tEach,
7720 tProc,
7721 tLambda,
7722 tSend,
7723 t__send__,
7724 t__attached__,
7725 t__recursive_key__,
7726 tInitialize,
7727 tInitialize_copy,
7728 tInitialize_clone,
7729 tInitialize_dup,
7730 tTo_int,
7731 tTo_ary,
7732 tTo_str,
7733 tTo_sym,
7734 tTo_hash,
7735 tTo_proc,
7736 tTo_io,
7737 tTo_a,
7738 tTo_s,
7739 tTo_i,
7740 tTo_f,
7741 tTo_r,
7742 tBt,
7743 tBt_locations,
7744 tCall,
7745 tMesg,
7746 tException,
7747 tLocals,
7748 tNOT,
7749 tAND,
7750 tOR,
7751 tDiv,
7752 tDivmod,
7753 tFdiv,
7754 tQuo,
7755 tName,
7756 tNil,
7757 tUScore,
7758 tNUMPARAM_1,
7759 tNUMPARAM_2,
7760 tNUMPARAM_3,
7761 tNUMPARAM_4,
7762 tNUMPARAM_5,
7763 tNUMPARAM_6,
7764 tNUMPARAM_7,
7765 tNUMPARAM_8,
7766 tNUMPARAM_9,
7767 tTOKEN_LOCAL_END,
7768 tTOKEN_INSTANCE_BEGIN = tTOKEN_LOCAL_END-1,
7769 tTOKEN_INSTANCE_END,
7770 tTOKEN_GLOBAL_BEGIN = tTOKEN_INSTANCE_END-1,
7771 tLASTLINE,
7772 tBACKREF,
7773 tERROR_INFO,
7774 tTOKEN_GLOBAL_END,
7775 tTOKEN_CONST_BEGIN = tTOKEN_GLOBAL_END-1,
7776 tTOKEN_CONST_END,
7777 tTOKEN_CLASS_BEGIN = tTOKEN_CONST_END-1,
7778 tTOKEN_CLASS_END,
7779 tTOKEN_ATTRSET_BEGIN = tTOKEN_CLASS_END-1,
7780 tTOKEN_ATTRSET_END,
7781 tNEXT_ID = tTOKEN_ATTRSET_END,
7782 idMax = ((tMax<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7783 idMin = ((tMin<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7784 idHash = ((tHash<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7785 idFreeze = ((tFreeze<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7786 idInspect = ((tInspect<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7787 idIntern = ((tIntern<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7788 idObject_id = ((tObject_id<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7789 idConst_added = ((tConst_added<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7790 idConst_missing = ((tConst_missing<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7791 idMethodMissing = ((tMethodMissing<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7792 idMethod_added = ((tMethod_added<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7793 idSingleton_method_added = ((tSingleton_method_added<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7794 idMethod_removed = ((tMethod_removed<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7795 idSingleton_method_removed = ((tSingleton_method_removed<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7796 idMethod_undefined = ((tMethod_undefined<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7797 idSingleton_method_undefined = ((tSingleton_method_undefined<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7798 idLength = ((tLength<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7799 idSize = ((tSize<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7800 idGets = ((tGets<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7801 idSucc = ((tSucc<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7802 idEach = ((tEach<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7803 idProc = ((tProc<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7804 idLambda = ((tLambda<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7805 idSend = ((tSend<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7806 id__send__ = ((t__send__<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7807 id__attached__ = ((t__attached__<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7808 id__recursive_key__ = ((t__recursive_key__<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7809 idInitialize = ((tInitialize<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7810 idInitialize_copy = ((tInitialize_copy<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7811 idInitialize_clone = ((tInitialize_clone<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7812 idInitialize_dup = ((tInitialize_dup<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7813 idTo_int = ((tTo_int<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7814 idTo_ary = ((tTo_ary<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7815 idTo_str = ((tTo_str<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7816 idTo_sym = ((tTo_sym<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7817 idTo_hash = ((tTo_hash<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7818 idTo_proc = ((tTo_proc<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7819 idTo_io = ((tTo_io<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7820 idTo_a = ((tTo_a<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7821 idTo_s = ((tTo_s<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7822 idTo_i = ((tTo_i<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7823 idTo_f = ((tTo_f<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7824 idTo_r = ((tTo_r<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7825 idBt = ((tBt<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7826 idBt_locations = ((tBt_locations<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7827 idCall = ((tCall<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7828 idMesg = ((tMesg<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7829 idException = ((tException<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7830 idLocals = ((tLocals<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7831 idNOT = ((tNOT<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7832 idAND = ((tAND<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7833 idOR = ((tOR<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7834 idDiv = ((tDiv<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7835 idDivmod = ((tDivmod<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7836 idFdiv = ((tFdiv<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7837 idQuo = ((tQuo<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7838 idName = ((tName<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7839 idNil = ((tNil<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7840 idUScore = ((tUScore<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7841 idNUMPARAM_1 = ((tNUMPARAM_1<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7842 idNUMPARAM_2 = ((tNUMPARAM_2<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7843 idNUMPARAM_3 = ((tNUMPARAM_3<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7844 idNUMPARAM_4 = ((tNUMPARAM_4<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7845 idNUMPARAM_5 = ((tNUMPARAM_5<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7846 idNUMPARAM_6 = ((tNUMPARAM_6<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7847 idNUMPARAM_7 = ((tNUMPARAM_7<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7848 idNUMPARAM_8 = ((tNUMPARAM_8<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7849 idNUMPARAM_9 = ((tNUMPARAM_9<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
7850 idLASTLINE = ((tLASTLINE<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_GLOBAL|RUBY_ID_STATIC_SYM),
7851 idBACKREF = ((tBACKREF<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_GLOBAL|RUBY_ID_STATIC_SYM),
7852 idERROR_INFO = ((tERROR_INFO<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_GLOBAL|RUBY_ID_STATIC_SYM),
7853 tLAST_OP_ID = tPRESERVED_ID_END-1,
7854 idLAST_OP_ID = tLAST_OP_ID >> RUBY_ID_SCOPE_SHIFT
7855};
7856void rb_obj_info_dump(VALUE obj);
7857void rb_obj_info_dump_loc(VALUE obj, const char *file, int line, const char *func);
7858
7859
7860void ruby_debug_breakpoint(void);
7861__attribute__((__format__(__printf__, (1), (2)))) void ruby_debug_printf(const char*, ...);
7862
7863
7864VALUE rb_ary_hash_values(long len, const VALUE *elements);
7865VALUE rb_ary_last(int, const VALUE *, VALUE);
7866void rb_ary_set_len(VALUE, long);
7867void rb_ary_delete_same(VALUE, VALUE);
7868VALUE rb_ary_tmp_new_fill(long capa);
7869VALUE rb_ary_at(VALUE, VALUE);
7870size_t rb_ary_memsize(VALUE);
7871VALUE rb_to_array_type(VALUE obj);
7872VALUE rb_to_array(VALUE obj);
7873void rb_ary_cancel_sharing(VALUE ary);
7874static inline VALUE rb_ary_entry_internal(VALUE ary, long offset);
7875static inline _Bool ARY_PTR_USING_P(VALUE ary);
7876static inline void RARY_TRANSIENT_SET(VALUE ary);
7877static inline void RARY_TRANSIENT_UNSET(VALUE ary);
7878
7879
7880VALUE rb_ary_tmp_new_from_values(VALUE, long, const VALUE *);
7881VALUE rb_check_to_array(VALUE ary);
7882VALUE rb_ary_behead(VALUE, long);
7883VALUE rb_ary_aref1(VALUE ary, VALUE i);
7884struct rb_execution_context_struct;
7885VALUE rb_ec_ary_new_from_values(struct rb_execution_context_struct *ec, long n, const VALUE *elts);
7886
7887
7888static inline VALUE
7889rb_ary_entry_internal(VALUE ary, long offset)
7890{
7891 long len = rb_array_len(ary);
7892 const VALUE *ptr = rb_array_const_ptr_transient(ary);
7893 if (len == 0) return ((VALUE)RUBY_Qnil);
7894 if (offset < 0) {
7895 offset += len;
7896 if (offset < 0) return ((VALUE)RUBY_Qnil);
7897 }
7898 else if (len <= offset) {
7899 return ((VALUE)RUBY_Qnil);
7900 }
7901 return ptr[offset];
7902}
7903static inline _Bool
7904ARY_PTR_USING_P(VALUE ary)
7905{
7906 return RB_FL_TEST_RAW(ary, ((VALUE)RUBY_FL_USER14));
7907}
7908static inline void
7909RARY_TRANSIENT_SET(VALUE ary)
7910{
7911 RB_FL_SET_RAW(ary, RARRAY_TRANSIENT_FLAG);
7912}
7913static inline void
7914RARY_TRANSIENT_UNSET(VALUE ary)
7915{
7916 RB_FL_UNSET_RAW(ary, RARRAY_TRANSIENT_FLAG);
7917}
7918__attribute__((__pure__))
7919__attribute__((__artificial__))
7920static inline VALUE
7921RARRAY_AREF(VALUE ary, long i)
7922{
7923 ((void)0);
7924 return rb_array_const_ptr_transient(ary)[i];
7925}
7926typedef unsigned long long rb_serial_t;
7927struct rb_callable_method_entry_struct;
7928struct rb_method_definition_struct;
7929struct rb_execution_context_struct;
7930struct rb_control_frame_struct;
7931struct rb_callinfo;
7932enum method_missing_reason {
7933 MISSING_NOENTRY = 0x00,
7934 MISSING_PRIVATE = 0x01,
7935 MISSING_PROTECTED = 0x02,
7936 MISSING_FCALL = 0x04,
7937 MISSING_VCALL = 0x08,
7938 MISSING_SUPER = 0x10,
7939 MISSING_MISSING = 0x20,
7940 MISSING_NONE = 0x40
7941};
7942rb_serial_t rb_next_class_serial(void);
7943VALUE rb_obj_is_thread(VALUE obj);
7944void rb_vm_mark(void *ptr);
7945void rb_vm_each_stack_value(void *ptr, void (*cb)(VALUE, void*), void *ctx);
7946__attribute__((__pure__)) VALUE rb_vm_top_self(void);
7947const void **rb_vm_get_insns_address_table(void);
7948VALUE rb_source_location(int *pline);
7949const char *rb_source_location_cstr(int *pline);
7950static void rb_vm_pop_cfunc_frame(void);
7951int rb_vm_add_root_module(VALUE module);
7952void rb_vm_check_redefinition_by_prepend(VALUE klass);
7953int rb_vm_check_optimizable_mid(VALUE mid);
7954VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements);
7955static VALUE ruby_vm_special_exception_copy(VALUE);
7956__attribute__((__pure__)) st_table *rb_vm_fstring_table(void);
7957
7958
7959VALUE rb_vm_exec(struct rb_execution_context_struct *, _Bool);
7960
7961
7962VALUE rb_current_realfilepath(void);
7963VALUE rb_check_block_call(VALUE, ID, int, const VALUE *, rb_block_call_func_t, VALUE);
7964typedef void rb_check_funcall_hook(int, VALUE, ID, int, const VALUE *, VALUE);
7965VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, const VALUE *argv,
7966 rb_check_funcall_hook *hook, VALUE arg);
7967VALUE rb_check_funcall_with_hook_kw(VALUE recv, ID mid, int argc, const VALUE *argv,
7968 rb_check_funcall_hook *hook, VALUE arg, int kw_splat);
7969const char *rb_type_str(enum ruby_value_type type);
7970VALUE rb_check_funcall_default(VALUE, ID, int, const VALUE *, VALUE);
7971VALUE rb_check_funcall_basic_kw(VALUE, ID, VALUE, int, const VALUE*, int);
7972VALUE rb_yield_1(VALUE val);
7973VALUE rb_yield_force_blockarg(VALUE values);
7974VALUE rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv,
7975 rb_block_call_func_t bl_proc, int min_argc, int max_argc,
7976 VALUE data2);
7977void rb_check_stack_overflow(void);
7978VALUE rb_equal_opt(VALUE obj1, VALUE obj2);
7979VALUE rb_eql_opt(VALUE obj1, VALUE obj2);
7980struct rb_iseq_struct;
7981
7982
7983const struct rb_callcache *rb_vm_search_method_slowpath(const struct rb_callinfo *ci, VALUE klass);
7984
7985
7986struct rb_execution_context_struct;
7987
7988
7989int rb_ec_obj_respond_to(struct rb_execution_context_struct *ec, VALUE obj, ID id, int priv);
7990
7991
7992void rb_clear_constant_cache(void);
7993void rb_print_backtrace(void);
7994VALUE rb_vm_thread_backtrace(int argc, const VALUE *argv, VALUE thval);
7995VALUE rb_vm_thread_backtrace_locations(int argc, const VALUE *argv, VALUE thval);
7996VALUE rb_vm_backtrace(int argc, const VALUE * argv, struct rb_execution_context_struct * ec);
7997VALUE rb_vm_backtrace_locations(int argc, const VALUE * argv, struct rb_execution_context_struct * ec);
7998VALUE rb_make_backtrace(void);
7999void rb_backtrace_print_as_bugreport(void);
8000int rb_backtrace_p(VALUE obj);
8001VALUE rb_backtrace_to_str_ary(VALUE obj);
8002VALUE rb_backtrace_to_location_ary(VALUE obj);
8003void rb_backtrace_each(VALUE (*iter)(VALUE recv, VALUE str), VALUE output);
8004int rb_frame_info_p(VALUE obj);
8005int rb_get_node_id_from_frame_info(VALUE obj);
8006const struct rb_iseq_struct *rb_get_iseq_from_frame_info(VALUE obj);
8007
8008
8009VALUE rb_ec_backtrace_object(const struct rb_execution_context_struct *ec);
8010void rb_backtrace_use_iseq_first_lineno_for_last_location(VALUE self);
8011
8012
8013struct rb_execution_context_struct;
8014struct rb_objspace;
8015typedef struct ractor_newobj_size_pool_cache {
8016 struct RVALUE *freelist;
8017 struct heap_page *using_page;
8018} rb_ractor_newobj_size_pool_cache_t;
8019typedef struct ractor_newobj_cache {
8020 size_t incremental_mark_step_allocated_slots;
8021 rb_ractor_newobj_size_pool_cache_t size_pool_caches[5];
8022} rb_ractor_newobj_cache_t;
8023extern VALUE *ruby_initial_gc_stress_ptr;
8024extern int ruby_disable_gc;
8025__attribute__((__malloc__)) void *ruby_mimmalloc(size_t size);
8026void ruby_mimfree(void *ptr);
8027void rb_objspace_set_event_hook(const rb_event_flag_t event);
8028VALUE rb_objspace_gc_enable(struct rb_objspace *);
8029VALUE rb_objspace_gc_disable(struct rb_objspace *);
8030void ruby_gc_set_params(void);
8031void rb_copy_wb_protected_attribute(VALUE dest, VALUE obj);
8032__attribute__((__alloc_align__(1)))
8033__attribute__((__malloc__)) void *rb_aligned_malloc(size_t, size_t) __attribute__((__alloc_size__ (2)));
8034size_t rb_size_mul_or_raise(size_t, size_t, VALUE);
8035size_t rb_size_mul_add_or_raise(size_t, size_t, size_t, VALUE);
8036__attribute__((__malloc__)) void *rb_xmalloc_mul_add(size_t, size_t, size_t);
8037__attribute__((__malloc__)) void *rb_xcalloc_mul_add(size_t, size_t, size_t);
8038void *rb_xrealloc_mul_add(const void *, size_t, size_t, size_t);
8039__attribute__((__malloc__)) void *rb_xmalloc_mul_add_mul(size_t, size_t, size_t, size_t);
8040__attribute__((__malloc__)) void *rb_xcalloc_mul_add_mul(size_t, size_t, size_t, size_t);
8041static inline void *ruby_sized_xrealloc_inlined(void *ptr, size_t new_size, size_t old_size) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (2)));
8042static inline void *ruby_sized_xrealloc2_inlined(void *ptr, size_t new_count, size_t elemsiz, size_t old_count) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (2, 3)));
8043static inline void ruby_sized_xfree_inlined(void *ptr, size_t size);
8044VALUE rb_class_allocate_instance(VALUE klass);
8045void rb_gc_ractor_newobj_cache_clear(rb_ractor_newobj_cache_t *newobj_cache);
8046size_t rb_gc_obj_slot_size(VALUE obj);
8047_Bool rb_gc_size_allocatable_p(size_t size);
8048int rb_objspace_garbage_object_p(VALUE obj);
8049
8050
8051const char *rb_objspace_data_type_name(VALUE obj);
8052VALUE rb_wb_protected_newobj_of(VALUE, VALUE, size_t);
8053VALUE rb_wb_unprotected_newobj_of(VALUE, VALUE, size_t);
8054VALUE rb_ec_wb_protected_newobj_of(struct rb_execution_context_struct *ec, VALUE klass, VALUE flags, size_t);
8055size_t rb_obj_memsize_of(VALUE);
8056void rb_gc_verify_internal_consistency(void);
8057size_t rb_obj_gc_flags(VALUE, ID[], size_t);
8058void rb_gc_mark_values(long n, const VALUE *values);
8059void rb_gc_mark_vm_stack_values(long n, const VALUE *values);
8060void *ruby_sized_xrealloc(void *ptr, size_t new_size, size_t old_size) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (2)));
8061void *ruby_sized_xrealloc2(void *ptr, size_t new_count, size_t element_size, size_t old_count) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (2, 3)));
8062void ruby_sized_xfree(void *x, size_t size);
8063
8064
8065
8066
8067int rb_ec_stack_check(struct rb_execution_context_struct *ec);
8068void rb_gc_writebarrier_remember(VALUE obj);
8069const char *rb_obj_info(VALUE obj);
8070
8071
8072static inline void *
8073ruby_sized_xrealloc_inlined(void *ptr, size_t new_size, size_t old_size)
8074{
8075 return ruby_xrealloc(ptr, new_size);
8076}
8077static inline void *
8078ruby_sized_xrealloc2_inlined(void *ptr, size_t new_count, size_t elemsiz, size_t old_count)
8079{
8080 return ruby_xrealloc2(ptr, new_count, elemsiz);
8081}
8082static inline void
8083ruby_sized_xfree_inlined(void *ptr, size_t size)
8084{
8085 ruby_xfree(ptr);
8086}
8087enum imemo_type {
8088 imemo_env = 0,
8089 imemo_cref = 1,
8090 imemo_svar = 2,
8091 imemo_throw_data = 3,
8092 imemo_ifunc = 4,
8093 imemo_memo = 5,
8094 imemo_ment = 6,
8095 imemo_iseq = 7,
8096 imemo_tmpbuf = 8,
8097 imemo_ast = 9,
8098 imemo_parser_strterm = 10,
8099 imemo_callinfo = 11,
8100 imemo_callcache = 12,
8101 imemo_constcache = 13,
8102};
8103struct vm_svar {
8104 VALUE flags;
8105 const VALUE cref_or_me;
8106 const VALUE lastline;
8107 const VALUE backref;
8108 const VALUE others;
8109};
8110struct vm_throw_data {
8111 VALUE flags;
8112 VALUE reserved;
8113 const VALUE throw_obj;
8114 const struct rb_control_frame_struct *catch_frame;
8115 int throw_state;
8116};
8117struct vm_ifunc_argc {
8118 int min, max;
8119};
8120struct vm_ifunc {
8121 VALUE flags;
8122 VALUE reserved;
8123 rb_block_call_func_t func;
8124 const void *data;
8125 struct vm_ifunc_argc argc;
8126};
8127struct rb_imemo_tmpbuf_struct {
8128 VALUE flags;
8129 VALUE reserved;
8130 VALUE *ptr;
8131 struct rb_imemo_tmpbuf_struct *next;
8132 size_t cnt;
8133};
8134struct MEMO {
8135 VALUE flags;
8136 VALUE reserved;
8137 const VALUE v1;
8138 const VALUE v2;
8139 union {
8140 long cnt;
8141 long state;
8142 const VALUE value;
8143 void (*func)(void);
8144 } u3;
8145};
8146typedef struct rb_imemo_tmpbuf_struct rb_imemo_tmpbuf_t;
8147rb_imemo_tmpbuf_t *rb_imemo_tmpbuf_parser_heap(void *buf, rb_imemo_tmpbuf_t *old_heap, size_t cnt);
8148struct vm_ifunc *rb_vm_ifunc_new(rb_block_call_func_t func, const void *data, int min_argc, int max_argc);
8149void rb_strterm_mark(VALUE obj);
8150static inline enum imemo_type imemo_type(VALUE imemo);
8151static inline int imemo_type_p(VALUE imemo, enum imemo_type imemo_type);
8152static inline _Bool imemo_throw_data_p(VALUE imemo);
8153static inline struct vm_ifunc *rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data);
8154static inline VALUE rb_imemo_tmpbuf_auto_free_pointer(void);
8155static inline void *RB_IMEMO_TMPBUF_PTR(VALUE v);
8156static inline void *rb_imemo_tmpbuf_set_ptr(VALUE v, void *ptr);
8157static inline VALUE rb_imemo_tmpbuf_auto_free_pointer_new_from_an_RString(VALUE str);
8158static inline void MEMO_V1_SET(struct MEMO *m, VALUE v);
8159static inline void MEMO_V2_SET(struct MEMO *m, VALUE v);
8160
8161
8162VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0);
8163const char *rb_imemo_name(enum imemo_type type);
8164
8165
8166static inline enum imemo_type
8167imemo_type(VALUE imemo)
8168{
8169 return (((struct RBasic *)(imemo))->flags >> ((VALUE)RUBY_FL_USHIFT)) & 0x0f;
8170}
8171static inline int
8172imemo_type_p(VALUE imemo, enum imemo_type imemo_type)
8173{
8174 if ((__builtin_expect(!!(!RB_SPECIAL_CONST_P(imemo)), 1))) {
8175 const VALUE mask = (0x0f << ((VALUE)RUBY_FL_USHIFT)) | RUBY_T_MASK;
8176 const VALUE expected_type = (imemo_type << ((VALUE)RUBY_FL_USHIFT)) | RUBY_T_IMEMO;
8177 return expected_type == (((struct RBasic *)(imemo))->flags & mask);
8178 }
8179 else {
8180 return 0;
8181 }
8182}
8183static inline _Bool
8184imemo_throw_data_p(VALUE imemo)
8185{
8186 return RB_TYPE_P(imemo, RUBY_T_IMEMO);
8187}
8188static inline struct vm_ifunc *
8189rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data)
8190{
8191 return rb_vm_ifunc_new(func, data, 0, (-1));
8192}
8193static inline VALUE
8194rb_imemo_tmpbuf_auto_free_pointer(void)
8195{
8196 return rb_imemo_new(imemo_tmpbuf, 0, 0, 0, 0);
8197}
8198static inline void *
8199RB_IMEMO_TMPBUF_PTR(VALUE v)
8200{
8201 const struct rb_imemo_tmpbuf_struct *p = (const void *)v;
8202 return p->ptr;
8203}
8204static inline void *
8205rb_imemo_tmpbuf_set_ptr(VALUE v, void *ptr)
8206{
8207 return ((rb_imemo_tmpbuf_t *)v)->ptr = ptr;
8208}
8209static inline VALUE
8210rb_imemo_tmpbuf_auto_free_pointer_new_from_an_RString(VALUE str)
8211{
8212 const void *src;
8213 VALUE imemo;
8214 rb_imemo_tmpbuf_t *tmpbuf;
8215 void *dst;
8216 size_t len;
8217 rb_string_value(&(str));
8218 imemo = rb_imemo_tmpbuf_auto_free_pointer();
8219 tmpbuf = (rb_imemo_tmpbuf_t *)imemo;
8220 len = RSTRING_LEN(str);
8221 src = RSTRING_PTR(str);
8222 dst = ruby_xmalloc(len);
8223 ruby_nonempty_memcpy(dst, src, len);
8224 tmpbuf->ptr = dst;
8225 return imemo;
8226}
8227static inline void
8228MEMO_V1_SET(struct MEMO *m, VALUE v)
8229{
8230 rb_obj_write((VALUE)(m), __extension__({
8231 ;
8232 ; __typeof__((VALUE *)(&m->v1)) unaligned_member_access_result = ((VALUE *)(&m->v1));
8233 ; unaligned_member_access_result; }), (VALUE)(v), "./internal/imemo.h", 233);
8234}
8235static inline void
8236MEMO_V2_SET(struct MEMO *m, VALUE v)
8237{
8238 rb_obj_write((VALUE)(m), __extension__({
8239 ;
8240 ; __typeof__((VALUE *)(&m->v2)) unaligned_member_access_result = ((VALUE *)(&m->v2));
8241 ; unaligned_member_access_result; }), (VALUE)(v), "./internal/imemo.h", 239);
8242}
8243typedef enum {
8244 METHOD_VISI_UNDEF = 0x00,
8245 METHOD_VISI_PUBLIC = 0x01,
8246 METHOD_VISI_PRIVATE = 0x02,
8247 METHOD_VISI_PROTECTED = 0x03,
8248 METHOD_VISI_MASK = 0x03
8249} rb_method_visibility_t;
8250typedef struct rb_scope_visi_struct {
8251 rb_method_visibility_t method_visi : 3;
8252 unsigned int module_func : 1;
8253} rb_scope_visibility_t;
8254typedef struct rb_cref_struct {
8255 VALUE flags;
8256 VALUE refinements;
8257 VALUE klass_or_self;
8258 struct rb_cref_struct * next;
8259 const rb_scope_visibility_t scope_visi;
8260} rb_cref_t;
8261typedef struct rb_method_entry_struct {
8262 VALUE flags;
8263 VALUE defined_class;
8264 struct rb_method_definition_struct * const def;
8265 ID called_id;
8266 VALUE owner;
8267} rb_method_entry_t;
8268typedef struct rb_callable_method_entry_struct {
8269 VALUE flags;
8270 const VALUE defined_class;
8271 struct rb_method_definition_struct * const def;
8272 ID called_id;
8273 const VALUE owner;
8274} rb_callable_method_entry_t;
8275static inline void
8276METHOD_ENTRY_VISI_SET(rb_method_entry_t *me, rb_method_visibility_t visi)
8277{
8278 ((void)0);
8279 me->flags = (me->flags & ~(((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) | (visi << ((((VALUE)RUBY_FL_USHIFT) + 4)+0));
8280}
8281static inline void
8282METHOD_ENTRY_BASIC_SET(rb_method_entry_t *me, unsigned int basic)
8283{
8284 ((void)0);
8285 me->flags = (me->flags & ~(((VALUE)RUBY_FL_USER6) )) | (basic << ((((VALUE)RUBY_FL_USHIFT) + 4)+2));
8286}
8287static inline void
8288METHOD_ENTRY_FLAGS_SET(rb_method_entry_t *me, rb_method_visibility_t visi, unsigned int basic)
8289{
8290 ((void)0);
8291 ((void)0);
8292 me->flags =
8293 (me->flags & ~(((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6))) |
8294 ((visi << ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) | (basic << ((((VALUE)RUBY_FL_USHIFT) + 4)+2)));
8295}
8296static inline void
8297METHOD_ENTRY_FLAGS_COPY(rb_method_entry_t *dst, const rb_method_entry_t *src)
8298{
8299 dst->flags =
8300 (dst->flags & ~(((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6))) |
8301 (src->flags & (((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6)));
8302}
8303typedef enum {
8304 VM_METHOD_TYPE_ISEQ,
8305 VM_METHOD_TYPE_CFUNC,
8306 VM_METHOD_TYPE_ATTRSET,
8307 VM_METHOD_TYPE_IVAR,
8308 VM_METHOD_TYPE_BMETHOD,
8309 VM_METHOD_TYPE_ZSUPER,
8310 VM_METHOD_TYPE_ALIAS,
8311 VM_METHOD_TYPE_UNDEF,
8312 VM_METHOD_TYPE_NOTIMPLEMENTED,
8313 VM_METHOD_TYPE_OPTIMIZED,
8314 VM_METHOD_TYPE_MISSING,
8315 VM_METHOD_TYPE_REFINED,
8316
8317} rb_method_type_t;
8318__extension__ _Static_assert(VM_METHOD_TYPE_REFINED <= (1<<4), "VM_METHOD_TYPE_MINIMUM_BITS" ": " "VM_METHOD_TYPE_REFINED <= (1<<VM_METHOD_TYPE_MINIMUM_BITS)");
8319typedef struct rb_iseq_struct rb_iseq_t;
8320typedef struct rb_method_iseq_struct {
8321 const rb_iseq_t * iseqptr;
8322 rb_cref_t * cref;
8323} rb_method_iseq_t;
8324typedef struct rb_method_cfunc_struct {
8325 VALUE (*func)();
8326 VALUE (*invoker)(VALUE recv, int argc, const VALUE *argv, VALUE (*func)());
8327 int argc;
8328} rb_method_cfunc_t;
8329typedef struct rb_method_attr_struct {
8330 ID id;
8331 VALUE location;
8332} rb_method_attr_t;
8333typedef struct rb_method_alias_struct {
8334 struct rb_method_entry_struct * original_me;
8335} rb_method_alias_t;
8336typedef struct rb_method_refined_struct {
8337 struct rb_method_entry_struct * orig_me;
8338 VALUE owner;
8339} rb_method_refined_t;
8340typedef struct rb_method_bmethod_struct {
8341 VALUE proc;
8342 struct rb_hook_list_struct *hooks;
8343 VALUE defined_ractor;
8344} rb_method_bmethod_t;
8345enum method_optimized_type {
8346 OPTIMIZED_METHOD_TYPE_SEND,
8347 OPTIMIZED_METHOD_TYPE_CALL,
8348 OPTIMIZED_METHOD_TYPE_BLOCK_CALL,
8349 OPTIMIZED_METHOD_TYPE_STRUCT_AREF,
8350 OPTIMIZED_METHOD_TYPE_STRUCT_ASET,
8351 OPTIMIZED_METHOD_TYPE__MAX
8352};
8353typedef struct rb_method_optimized {
8354 enum method_optimized_type type;
8355 unsigned int index;
8356} rb_method_optimized_t;
8357struct rb_method_definition_struct {
8358 rb_method_type_t type : 4;
8359 unsigned int iseq_overload: 1;
8360 int alias_count : 27;
8361 int complemented_count : 28;
8362 unsigned int no_redef_warning: 1;
8363 union {
8364 rb_method_iseq_t iseq;
8365 rb_method_cfunc_t cfunc;
8366 rb_method_attr_t attr;
8367 rb_method_alias_t alias;
8368 rb_method_refined_t refined;
8369 rb_method_bmethod_t bmethod;
8370 rb_method_optimized_t optimized;
8371 } body;
8372 ID original_id;
8373 uintptr_t method_serial;
8374};
8375struct rb_id_table;
8376typedef struct rb_method_definition_struct rb_method_definition_t;
8377__extension__ _Static_assert(__builtin_offsetof (rb_method_definition_t, body)==8, "sizeof_method_def" ": " "offsetof(rb_method_definition_t, body)==8");
8378void rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *option, rb_method_visibility_t visi);
8379void rb_add_method_cfunc(VALUE klass, ID mid, VALUE (*func)(), int argc, rb_method_visibility_t visi);
8380void rb_add_method_iseq(VALUE klass, ID mid, const rb_iseq_t *iseq, rb_cref_t *cref, rb_method_visibility_t visi);
8381void rb_add_method_optimized(VALUE klass, ID mid, enum method_optimized_type, unsigned int index, rb_method_visibility_t visi);
8382void rb_add_refined_method_entry(VALUE refined_class, ID mid);
8383rb_method_entry_t *rb_method_entry_set(VALUE klass, ID mid, const rb_method_entry_t *, rb_method_visibility_t noex);
8384rb_method_entry_t *rb_method_entry_create(ID called_id, VALUE klass, rb_method_visibility_t visi, const rb_method_definition_t *def);
8385const rb_method_entry_t *rb_method_entry_at(VALUE obj, ID id);
8386const rb_method_entry_t *rb_method_entry(VALUE klass, ID id);
8387const rb_method_entry_t *rb_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class);
8388const rb_method_entry_t *rb_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class);
8389const rb_method_entry_t *rb_resolve_refined_method(VALUE refinements, const rb_method_entry_t *me);
8390
8391
8392const rb_method_entry_t *rb_resolve_me_location(const rb_method_entry_t *, VALUE[5]);
8393
8394
8395const rb_callable_method_entry_t *rb_callable_method_entry(VALUE klass, ID id);
8396const rb_callable_method_entry_t *rb_callable_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class);
8397const rb_callable_method_entry_t *rb_callable_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class);
8398int rb_method_entry_arity(const rb_method_entry_t *me);
8399int rb_method_entry_eq(const rb_method_entry_t *m1, const rb_method_entry_t *m2);
8400st_index_t rb_hash_method_entry(st_index_t hash, const rb_method_entry_t *me);
8401VALUE rb_method_entry_location(const rb_method_entry_t *me);
8402void rb_free_method_entry(const rb_method_entry_t *me);
8403const rb_method_entry_t *rb_method_entry_clone(const rb_method_entry_t *me);
8404const rb_callable_method_entry_t *rb_method_entry_complement_defined_class(const rb_method_entry_t *src_me, ID called_id, VALUE defined_class);
8405void rb_method_entry_copy(rb_method_entry_t *dst, const rb_method_entry_t *src);
8406void rb_method_table_insert(VALUE klass, struct rb_id_table *table, ID method_id, const rb_method_entry_t *me);
8407void rb_scope_visibility_set(rb_method_visibility_t);
8408VALUE rb_unnamed_parameters(int arity);
8409void rb_clear_method_cache(VALUE klass_or_module, ID mid);
8410void rb_clear_method_cache_all(void);
8411enum node_type {
8412 NODE_SCOPE,
8413 NODE_BLOCK,
8414 NODE_IF,
8415 NODE_UNLESS,
8416 NODE_CASE,
8417 NODE_CASE2,
8418 NODE_CASE3,
8419 NODE_WHEN,
8420 NODE_IN,
8421 NODE_WHILE,
8422 NODE_UNTIL,
8423 NODE_ITER,
8424 NODE_FOR,
8425 NODE_FOR_MASGN,
8426 NODE_BREAK,
8427 NODE_NEXT,
8428 NODE_REDO,
8429 NODE_RETRY,
8430 NODE_BEGIN,
8431 NODE_RESCUE,
8432 NODE_RESBODY,
8433 NODE_ENSURE,
8434 NODE_AND,
8435 NODE_OR,
8436 NODE_MASGN,
8437 NODE_LASGN,
8438 NODE_DASGN,
8439 NODE_GASGN,
8440 NODE_IASGN,
8441 NODE_CDECL,
8442 NODE_CVASGN,
8443 NODE_OP_ASGN1,
8444 NODE_OP_ASGN2,
8445 NODE_OP_ASGN_AND,
8446 NODE_OP_ASGN_OR,
8447 NODE_OP_CDECL,
8448 NODE_CALL,
8449 NODE_OPCALL,
8450 NODE_FCALL,
8451 NODE_VCALL,
8452 NODE_QCALL,
8453 NODE_SUPER,
8454 NODE_ZSUPER,
8455 NODE_LIST,
8456 NODE_ZLIST,
8457 NODE_VALUES,
8458 NODE_HASH,
8459 NODE_RETURN,
8460 NODE_YIELD,
8461 NODE_LVAR,
8462 NODE_DVAR,
8463 NODE_GVAR,
8464 NODE_IVAR,
8465 NODE_CONST,
8466 NODE_CVAR,
8467 NODE_NTH_REF,
8468 NODE_BACK_REF,
8469 NODE_MATCH,
8470 NODE_MATCH2,
8471 NODE_MATCH3,
8472 NODE_LIT,
8473 NODE_STR,
8474 NODE_DSTR,
8475 NODE_XSTR,
8476 NODE_DXSTR,
8477 NODE_EVSTR,
8478 NODE_DREGX,
8479 NODE_ONCE,
8480 NODE_ARGS,
8481 NODE_ARGS_AUX,
8482 NODE_OPT_ARG,
8483 NODE_KW_ARG,
8484 NODE_POSTARG,
8485 NODE_ARGSCAT,
8486 NODE_ARGSPUSH,
8487 NODE_SPLAT,
8488 NODE_BLOCK_PASS,
8489 NODE_DEFN,
8490 NODE_DEFS,
8491 NODE_ALIAS,
8492 NODE_VALIAS,
8493 NODE_UNDEF,
8494 NODE_CLASS,
8495 NODE_MODULE,
8496 NODE_SCLASS,
8497 NODE_COLON2,
8498 NODE_COLON3,
8499 NODE_DOT2,
8500 NODE_DOT3,
8501 NODE_FLIP2,
8502 NODE_FLIP3,
8503 NODE_SELF,
8504 NODE_NIL,
8505 NODE_TRUE,
8506 NODE_FALSE,
8507 NODE_ERRINFO,
8508 NODE_DEFINED,
8509 NODE_POSTEXE,
8510 NODE_DSYM,
8511 NODE_ATTRASGN,
8512 NODE_LAMBDA,
8513 NODE_ARYPTN,
8514 NODE_HSHPTN,
8515 NODE_FNDPTN,
8516 NODE_LAST
8517};
8518typedef struct rb_code_position_struct {
8519 int lineno;
8520 int column;
8521} rb_code_position_t;
8522typedef struct rb_code_location_struct {
8523 rb_code_position_t beg_pos;
8524 rb_code_position_t end_pos;
8525} rb_code_location_t;
8526static inline rb_code_location_t
8527code_loc_gen(const rb_code_location_t *loc1, const rb_code_location_t *loc2)
8528{
8529 rb_code_location_t loc;
8530 loc.beg_pos = loc1->beg_pos;
8531 loc.end_pos = loc2->end_pos;
8532 return loc;
8533}
8534typedef struct rb_ast_id_table {
8535 int size;
8536 ID ids[];
8537} rb_ast_id_table_t;
8538typedef struct RNode {
8539 VALUE flags;
8540 union {
8541 struct RNode *node;
8542 ID id;
8543 VALUE value;
8544 rb_ast_id_table_t *tbl;
8545 } u1;
8546 union {
8547 struct RNode *node;
8548 ID id;
8549 long argc;
8550 VALUE value;
8551 } u2;
8552 union {
8553 struct RNode *node;
8554 ID id;
8555 long state;
8556 struct rb_args_info *args;
8557 struct rb_ary_pattern_info *apinfo;
8558 struct rb_fnd_pattern_info *fpinfo;
8559 VALUE value;
8560 } u3;
8561 rb_code_location_t nd_loc;
8562 int node_id;
8563} NODE;
8564VALUE rb_node_case_when_optimizable_literal(const NODE *const node);
8565
8566
8567typedef struct node_buffer_struct node_buffer_t;
8568typedef struct rb_ast_body_struct {
8569 const NODE *root;
8570 VALUE compile_option;
8571 VALUE script_lines;
8572} rb_ast_body_t;
8573typedef struct rb_ast_struct {
8574 VALUE flags;
8575 node_buffer_t *node_buffer;
8576 rb_ast_body_t body;
8577} rb_ast_t;
8578rb_ast_t *rb_ast_new(void);
8579void rb_ast_mark(rb_ast_t*);
8580void rb_ast_update_references(rb_ast_t*);
8581void rb_ast_dispose(rb_ast_t*);
8582void rb_ast_free(rb_ast_t*);
8583size_t rb_ast_memsize(const rb_ast_t*);
8584void rb_ast_add_mark_object(rb_ast_t*, VALUE);
8585NODE *rb_ast_newnode(rb_ast_t*, enum node_type type);
8586void rb_ast_delete_node(rb_ast_t*, NODE *n);
8587rb_ast_id_table_t *rb_ast_new_local_table(rb_ast_t*, int);
8588rb_ast_id_table_t *rb_ast_resize_latest_local_table(rb_ast_t*, int);
8589VALUE rb_parser_new(void);
8590VALUE rb_parser_end_seen_p(VALUE);
8591VALUE rb_parser_encoding(VALUE);
8592VALUE rb_parser_set_yydebug(VALUE, VALUE);
8593VALUE rb_parser_dump_tree(const NODE *node, int comment);
8594void rb_parser_set_options(VALUE, int, int, int, int);
8595rb_ast_t *rb_parser_compile_string(VALUE, const char*, VALUE, int);
8596rb_ast_t *rb_parser_compile_string_path(VALUE vparser, VALUE fname, VALUE src, int line);
8597rb_ast_t *rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE input, int line);
8598rb_ast_t *rb_parser_compile_generic(VALUE vparser, VALUE (*lex_gets)(VALUE, int), VALUE fname, VALUE input, int line);
8599void rb_node_init(NODE *n, enum node_type type, VALUE a0, VALUE a1, VALUE a2);
8600const char *ruby_node_name(int node);
8601const struct kwtable *rb_reserved_word(const char *, unsigned int);
8602struct rb_args_info {
8603 NODE *pre_init;
8604 NODE *post_init;
8605 int pre_args_num;
8606 int post_args_num;
8607 ID first_post_arg;
8608 ID rest_arg;
8609 ID block_arg;
8610 NODE *kw_args;
8611 NODE *kw_rest_arg;
8612 NODE *opt_args;
8613 unsigned int no_kwarg: 1;
8614 unsigned int ruby2_keywords: 1;
8615 VALUE imemo;
8616};
8617struct rb_ary_pattern_info {
8618 NODE *pre_args;
8619 NODE *rest_arg;
8620 NODE *post_args;
8621};
8622struct rb_fnd_pattern_info {
8623 NODE *pre_rest_arg;
8624 NODE *args;
8625 NODE *post_rest_arg;
8626};
8627struct parser_params;
8628void *rb_parser_malloc(struct parser_params *, size_t);
8629void *rb_parser_realloc(struct parser_params *, void *, size_t);
8630void *rb_parser_calloc(struct parser_params *, size_t, size_t);
8631void rb_parser_free(struct parser_params *, void *);
8632__attribute__((__format__(__printf__, (2), (3)))) void rb_parser_printf(struct parser_params *parser, const char *fmt, ...);
8633void rb_ast_node_type_change(NODE *n, enum node_type type);
8634
8635
8636static inline VALUE
8637rb_node_set_type(NODE *n, enum node_type t)
8638{
8639 return (n)->flags=(((n)->flags&~(((VALUE)0x7f)<<8))|((((unsigned long)(t))<<8)&(((VALUE)0x7f)<<8)));
8640}
8641static inline _Bool
8642nd_type_p(const NODE *n, enum node_type t)
8643{
8644 return (enum node_type)((int) (((n)->flags & (((VALUE)0x7f)<<8))>>8)) == t;
8645}
8646typedef unsigned int rb_atomic_t;
8647__attribute__((__artificial__))
8648
8649__attribute__((__nonnull__ (1)))
8650static inline rb_atomic_t
8651rbimpl_atomic_fetch_add(volatile rb_atomic_t *ptr, rb_atomic_t val)
8652{
8653 return __atomic_fetch_add(ptr, val, 5);
8654}
8655__attribute__((__artificial__))
8656
8657__attribute__((__nonnull__ (1)))
8658static inline void
8659rbimpl_atomic_add(volatile rb_atomic_t *ptr, rb_atomic_t val)
8660{
8661 __atomic_add_fetch(ptr, val, 5);
8662}
8663__attribute__((__artificial__))
8664
8665__attribute__((__nonnull__ (1)))
8666static inline void
8667rbimpl_atomic_size_add(volatile size_t *ptr, size_t val)
8668{
8669 __atomic_add_fetch(ptr, val, 5);
8670}
8671__attribute__((__artificial__))
8672
8673__attribute__((__nonnull__ (1)))
8674static inline void
8675rbimpl_atomic_inc(volatile rb_atomic_t *ptr)
8676{
8677 rbimpl_atomic_add(ptr, 1);
8678}
8679__attribute__((__artificial__))
8680
8681__attribute__((__nonnull__ (1)))
8682static inline void
8683rbimpl_atomic_size_inc(volatile size_t *ptr)
8684{
8685 rbimpl_atomic_size_add(ptr, 1);
8686}
8687__attribute__((__artificial__))
8688
8689__attribute__((__nonnull__ (1)))
8690static inline rb_atomic_t
8691rbimpl_atomic_fetch_sub(volatile rb_atomic_t *ptr, rb_atomic_t val)
8692{
8693 return __atomic_fetch_sub(ptr, val, 5);
8694}
8695__attribute__((__artificial__))
8696
8697__attribute__((__nonnull__ (1)))
8698static inline void
8699rbimpl_atomic_sub(volatile rb_atomic_t *ptr, rb_atomic_t val)
8700{
8701 __atomic_sub_fetch(ptr, val, 5);
8702}
8703__attribute__((__artificial__))
8704
8705__attribute__((__nonnull__ (1)))
8706static inline void
8707rbimpl_atomic_size_sub(volatile size_t *ptr, size_t val)
8708{
8709 __atomic_sub_fetch(ptr, val, 5);
8710}
8711__attribute__((__artificial__))
8712
8713__attribute__((__nonnull__ (1)))
8714static inline void
8715rbimpl_atomic_dec(volatile rb_atomic_t *ptr)
8716{
8717 rbimpl_atomic_sub(ptr, 1);
8718}
8719__attribute__((__artificial__))
8720
8721__attribute__((__nonnull__ (1)))
8722static inline void
8723rbimpl_atomic_size_dec(volatile size_t *ptr)
8724{
8725 rbimpl_atomic_size_sub(ptr, 1);
8726}
8727__attribute__((__artificial__))
8728
8729__attribute__((__nonnull__ (1)))
8730static inline void
8731rbimpl_atomic_or(volatile rb_atomic_t *ptr, rb_atomic_t val)
8732{
8733 __atomic_or_fetch(ptr, val, 5);
8734}
8735__attribute__((__artificial__))
8736
8737__attribute__((__nonnull__ (1)))
8738static inline rb_atomic_t
8739rbimpl_atomic_exchange(volatile rb_atomic_t *ptr, rb_atomic_t val)
8740{
8741 return __atomic_exchange_n(ptr, val, 5);
8742}
8743__attribute__((__artificial__))
8744
8745__attribute__((__nonnull__ (1)))
8746static inline size_t
8747rbimpl_atomic_size_exchange(volatile size_t *ptr, size_t val)
8748{
8749 return __atomic_exchange_n(ptr, val, 5);
8750}
8751__attribute__((__artificial__))
8752
8753__attribute__((__nonnull__ (1)))
8754static inline void *
8755rbimpl_atomic_ptr_exchange(void *volatile *ptr, const void *val)
8756{
8757 __extension__ _Static_assert(sizeof *ptr == sizeof(size_t), "sizeof_voidp" ": " "sizeof *ptr == sizeof(size_t)");
8758 const size_t sval = ((size_t)val);
8759 volatile size_t *const sptr = ((volatile size_t *)ptr);
8760 const size_t sret = rbimpl_atomic_size_exchange(sptr, sval);
8761 return ((void *)sret);
8762}
8763__attribute__((__artificial__))
8764
8765__attribute__((__nonnull__ (1)))
8766static inline VALUE
8767rbimpl_atomic_value_exchange(volatile VALUE *ptr, VALUE val)
8768{
8769 __extension__ _Static_assert(sizeof *ptr == sizeof(size_t), "sizeof_value" ": " "sizeof *ptr == sizeof(size_t)");
8770 const size_t sval = ((size_t)val);
8771 volatile size_t *const sptr = ((volatile size_t *)ptr);
8772 const size_t sret = rbimpl_atomic_size_exchange(sptr, sval);
8773 return ((VALUE)sret);
8774}
8775__attribute__((__artificial__))
8776
8777__attribute__((__nonnull__ (1)))
8778static inline void
8779rbimpl_atomic_set(volatile rb_atomic_t *ptr, rb_atomic_t val)
8780{
8781 __atomic_store_n(ptr, val, 5);
8782}
8783__attribute__((__artificial__))
8784
8785__attribute__((__nonnull__ (1)))
8786static inline rb_atomic_t
8787rbimpl_atomic_cas(volatile rb_atomic_t *ptr, rb_atomic_t oldval, rb_atomic_t newval)
8788{
8789 __atomic_compare_exchange_n(
8790 ptr, &oldval, newval, 0, 5, 5);
8791 return oldval;
8792}
8793__attribute__((__artificial__))
8794
8795__attribute__((__nonnull__ (1)))
8796static inline size_t
8797rbimpl_atomic_size_cas(volatile size_t *ptr, size_t oldval, size_t newval)
8798{
8799 __atomic_compare_exchange_n(
8800 ptr, &oldval, newval, 0, 5, 5);
8801 return oldval;
8802}
8803__attribute__((__artificial__))
8804
8805__attribute__((__nonnull__ (1)))
8806static inline void *
8807rbimpl_atomic_ptr_cas(void **ptr, const void *oldval, const void *newval)
8808{
8809 __extension__ _Static_assert(sizeof *ptr == sizeof(size_t), "sizeof_voidp" ": " "sizeof *ptr == sizeof(size_t)");
8810 const size_t snew = ((size_t)newval);
8811 const size_t sold = ((size_t)oldval);
8812 volatile size_t *const sptr = ((volatile size_t *)ptr);
8813 const size_t sret = rbimpl_atomic_size_cas(sptr, sold, snew);
8814 return ((void *)sret);
8815}
8816__attribute__((__artificial__))
8817
8818__attribute__((__nonnull__ (1)))
8819static inline VALUE
8820rbimpl_atomic_value_cas(volatile VALUE *ptr, VALUE oldval, VALUE newval)
8821{
8822 __extension__ _Static_assert(sizeof *ptr == sizeof(size_t), "sizeof_value" ": " "sizeof *ptr == sizeof(size_t)");
8823 const size_t snew = ((size_t)newval);
8824 const size_t sold = ((size_t)oldval);
8825 volatile size_t *const sptr = ((volatile size_t *)ptr);
8826 const size_t sret = rbimpl_atomic_size_cas(sptr, sold, snew);
8827 return ((VALUE)sret);
8828}
8829struct sched_param
8830{
8831 int sched_priority;
8832};
8833
8834extern int clone (int (*__fn) (void *__arg), void *__child_stack,
8835 int __flags, void *__arg, ...) __attribute__ ((__nothrow__ , __leaf__));
8836extern int unshare (int __flags) __attribute__ ((__nothrow__ , __leaf__));
8837extern int sched_getcpu (void) __attribute__ ((__nothrow__ , __leaf__));
8838extern int getcpu (unsigned int *, unsigned int *) __attribute__ ((__nothrow__ , __leaf__));
8839extern int setns (int __fd, int __nstype) __attribute__ ((__nothrow__ , __leaf__));
8840
8841typedef unsigned long int __cpu_mask;
8842typedef struct
8843{
8844 __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];
8845} cpu_set_t;
8846
8847extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
8848 __attribute__ ((__nothrow__ , __leaf__));
8849extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
8850extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__ , __leaf__));
8851
8852
8853extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
8854 __attribute__ ((__nothrow__ , __leaf__));
8855extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__));
8856extern int sched_setscheduler (__pid_t __pid, int __policy,
8857 const struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__));
8858extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
8859extern int sched_yield (void) __attribute__ ((__nothrow__ , __leaf__));
8860extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__ , __leaf__));
8861extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__ , __leaf__));
8862extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__ , __leaf__));
8863extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize,
8864 const cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__));
8865extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize,
8866 cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__));
8867
8868enum
8869{
8870 PTHREAD_CREATE_JOINABLE,
8871 PTHREAD_CREATE_DETACHED
8872};
8873enum
8874{
8875 PTHREAD_MUTEX_TIMED_NP,
8876 PTHREAD_MUTEX_RECURSIVE_NP,
8877 PTHREAD_MUTEX_ERRORCHECK_NP,
8878 PTHREAD_MUTEX_ADAPTIVE_NP
8879 ,
8880 PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
8881 PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
8882 PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
8883 PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
8884 , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP
8885};
8886enum
8887{
8888 PTHREAD_MUTEX_STALLED,
8889 PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,
8890 PTHREAD_MUTEX_ROBUST,
8891 PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST
8892};
8893enum
8894{
8895 PTHREAD_PRIO_NONE,
8896 PTHREAD_PRIO_INHERIT,
8897 PTHREAD_PRIO_PROTECT
8898};
8899enum
8900{
8901 PTHREAD_RWLOCK_PREFER_READER_NP,
8902 PTHREAD_RWLOCK_PREFER_WRITER_NP,
8903 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
8904 PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
8905};
8906enum
8907{
8908 PTHREAD_INHERIT_SCHED,
8909 PTHREAD_EXPLICIT_SCHED
8910};
8911enum
8912{
8913 PTHREAD_SCOPE_SYSTEM,
8914 PTHREAD_SCOPE_PROCESS
8915};
8916enum
8917{
8918 PTHREAD_PROCESS_PRIVATE,
8919 PTHREAD_PROCESS_SHARED
8920};
8921struct _pthread_cleanup_buffer
8922{
8923 void (*__routine) (void *);
8924 void *__arg;
8925 int __canceltype;
8926 struct _pthread_cleanup_buffer *__prev;
8927};
8928enum
8929{
8930 PTHREAD_CANCEL_ENABLE,
8931 PTHREAD_CANCEL_DISABLE
8932};
8933enum
8934{
8935 PTHREAD_CANCEL_DEFERRED,
8936 PTHREAD_CANCEL_ASYNCHRONOUS
8937};
8938
8939extern int pthread_create (pthread_t *__restrict __newthread,
8940 const pthread_attr_t *__restrict __attr,
8941 void *(*__start_routine) (void *),
8942 void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
8943extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
8944extern int pthread_join (pthread_t __th, void **__thread_return);
8945extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __attribute__ ((__nothrow__ , __leaf__));
8946extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
8947 const struct timespec *__abstime);
8948extern int pthread_clockjoin_np (pthread_t __th, void **__thread_return,
8949 clockid_t __clockid,
8950 const struct timespec *__abstime);
8951extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__ , __leaf__));
8952extern pthread_t pthread_self (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
8953extern int pthread_equal (pthread_t __thread1, pthread_t __thread2)
8954 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
8955extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8956extern int pthread_attr_destroy (pthread_attr_t *__attr)
8957 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8958extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr,
8959 int *__detachstate)
8960 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8961extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
8962 int __detachstate)
8963 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8964extern int pthread_attr_getguardsize (const pthread_attr_t *__attr,
8965 size_t *__guardsize)
8966 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8967extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
8968 size_t __guardsize)
8969 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8970extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr,
8971 struct sched_param *__restrict __param)
8972 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8973extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
8974 const struct sched_param *__restrict
8975 __param) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8976extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict
8977 __attr, int *__restrict __policy)
8978 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8979extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
8980 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8981extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict
8982 __attr, int *__restrict __inherit)
8983 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8984extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
8985 int __inherit)
8986 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8987extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr,
8988 int *__restrict __scope)
8989 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
8990extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
8991 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8992extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict
8993 __attr, void **__restrict __stackaddr)
8994 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__));
8995extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
8996 void *__stackaddr)
8997 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__));
8998extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict
8999 __attr, size_t *__restrict __stacksize)
9000 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
9001extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
9002 size_t __stacksize)
9003 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9004extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr,
9005 void **__restrict __stackaddr,
9006 size_t *__restrict __stacksize)
9007 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3)));
9008extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
9009 size_t __stacksize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9010extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr,
9011 size_t __cpusetsize,
9012 const cpu_set_t *__cpuset)
9013 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
9014extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr,
9015 size_t __cpusetsize,
9016 cpu_set_t *__cpuset)
9017 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
9018extern int pthread_getattr_default_np (pthread_attr_t *__attr)
9019 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9020extern int pthread_attr_setsigmask_np (pthread_attr_t *__attr,
9021 const __sigset_t *sigmask);
9022extern int pthread_attr_getsigmask_np (const pthread_attr_t *__attr,
9023 __sigset_t *sigmask);
9024extern int pthread_setattr_default_np (const pthread_attr_t *__attr)
9025 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9026extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr)
9027 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
9028extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
9029 const struct sched_param *__param)
9030 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
9031extern int pthread_getschedparam (pthread_t __target_thread,
9032 int *__restrict __policy,
9033 struct sched_param *__restrict __param)
9034 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
9035extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
9036 __attribute__ ((__nothrow__ , __leaf__));
9037extern int pthread_getname_np (pthread_t __target_thread, char *__buf,
9038 size_t __buflen)
9039 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
9040extern int pthread_setname_np (pthread_t __target_thread, const char *__name)
9041 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
9042extern int pthread_getconcurrency (void) __attribute__ ((__nothrow__ , __leaf__));
9043extern int pthread_setconcurrency (int __level) __attribute__ ((__nothrow__ , __leaf__));
9044extern int pthread_yield (void) __attribute__ ((__nothrow__ , __leaf__));
9045extern int pthread_yield (void) __asm__ ("" "sched_yield") __attribute__ ((__nothrow__ , __leaf__))
9046 __attribute__ ((__deprecated__ ("pthread_yield is deprecated, use sched_yield instead")));
9047extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize,
9048 const cpu_set_t *__cpuset)
9049 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
9050extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize,
9051 cpu_set_t *__cpuset)
9052 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
9053extern int pthread_once (pthread_once_t *__once_control,
9054 void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2)));
9055extern int pthread_setcancelstate (int __state, int *__oldstate);
9056extern int pthread_setcanceltype (int __type, int *__oldtype);
9057extern int pthread_cancel (pthread_t __th);
9058extern void pthread_testcancel (void);
9059struct __cancel_jmp_buf_tag
9060{
9061 __jmp_buf __cancel_jmp_buf;
9062 int __mask_was_saved;
9063};
9064typedef struct
9065{
9066 struct __cancel_jmp_buf_tag __cancel_jmp_buf[1];
9067 void *__pad[4];
9068} __pthread_unwind_buf_t __attribute__ ((__aligned__));
9069struct __pthread_cleanup_frame
9070{
9071 void (*__cancel_routine) (void *);
9072 void *__cancel_arg;
9073 int __do_it;
9074 int __cancel_type;
9075};
9076extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)
9077 ;
9078extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
9079 ;
9080extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf)
9081 ;
9082extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf)
9083 ;
9084extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
9085 __attribute__ ((__noreturn__))
9086 __attribute__ ((__weak__))
9087 ;
9088extern int __sigsetjmp_cancel (struct __cancel_jmp_buf_tag __env[1], int __savemask) __asm__ ("" "__sigsetjmp") __attribute__ ((__nothrow__)) __attribute__ ((__returns_twice__));
9089extern int pthread_mutex_init (pthread_mutex_t *__mutex,
9090 const pthread_mutexattr_t *__mutexattr)
9091 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9092extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
9093 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9094extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
9095 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
9096extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
9097 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
9098extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
9099 const struct timespec *__restrict
9100 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
9101extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex,
9102 clockid_t __clockid,
9103 const struct timespec *__restrict
9104 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
9105extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
9106 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
9107extern int pthread_mutex_getprioceiling (const pthread_mutex_t *
9108 __restrict __mutex,
9109 int *__restrict __prioceiling)
9110 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
9111extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
9112 int __prioceiling,
9113 int *__restrict __old_ceiling)
9114 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
9115extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)
9116 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9117extern int pthread_mutex_consistent_np (pthread_mutex_t *) __asm__ ("" "pthread_mutex_consistent") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)))
9118 __attribute__ ((__deprecated__ ("pthread_mutex_consistent_np is deprecated, use pthread_mutex_consistent")));
9119extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)
9120 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9121extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)
9122 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9123extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t *
9124 __restrict __attr,
9125 int *__restrict __pshared)
9126 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
9127extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
9128 int __pshared)
9129 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9130extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict
9131 __attr, int *__restrict __kind)
9132 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
9133extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
9134 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9135extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *
9136 __restrict __attr,
9137 int *__restrict __protocol)
9138 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
9139extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
9140 int __protocol)
9141 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9142extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *
9143 __restrict __attr,
9144 int *__restrict __prioceiling)
9145 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
9146extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
9147 int __prioceiling)
9148 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9149extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr,
9150 int *__robustness)
9151 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
9152extern int pthread_mutexattr_getrobust_np (pthread_mutexattr_t *, int *) __asm__ ("" "pthread_mutexattr_getrobust") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)))
9153 __attribute__ ((__deprecated__ ("pthread_mutexattr_getrobust_np is deprecated, use pthread_mutexattr_getrobust")));
9154extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
9155 int __robustness)
9156 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9157extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *, int) __asm__ ("" "pthread_mutexattr_setrobust") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)))
9158 __attribute__ ((__deprecated__ ("pthread_mutexattr_setrobust_np is deprecated, use pthread_mutexattr_setrobust")));
9159extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
9160 const pthread_rwlockattr_t *__restrict
9161 __attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9162extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
9163 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9164extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)
9165 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
9166extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
9167 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
9168extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
9169 const struct timespec *__restrict
9170 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
9171extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock,
9172 clockid_t __clockid,
9173 const struct timespec *__restrict
9174 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
9175extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
9176 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
9177extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
9178 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
9179extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
9180 const struct timespec *__restrict
9181 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
9182extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock,
9183 clockid_t __clockid,
9184 const struct timespec *__restrict
9185 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
9186extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
9187 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
9188extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)
9189 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9190extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)
9191 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9192extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *
9193 __restrict __attr,
9194 int *__restrict __pshared)
9195 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
9196extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
9197 int __pshared)
9198 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9199extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *
9200 __restrict __attr,
9201 int *__restrict __pref)
9202 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
9203extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
9204 int __pref) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9205extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
9206 const pthread_condattr_t *__restrict __cond_attr)
9207 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9208extern int pthread_cond_destroy (pthread_cond_t *__cond)
9209 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9210extern int pthread_cond_signal (pthread_cond_t *__cond)
9211 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
9212extern int pthread_cond_broadcast (pthread_cond_t *__cond)
9213 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
9214extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
9215 pthread_mutex_t *__restrict __mutex)
9216 __attribute__ ((__nonnull__ (1, 2)));
9217extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
9218 pthread_mutex_t *__restrict __mutex,
9219 const struct timespec *__restrict __abstime)
9220 __attribute__ ((__nonnull__ (1, 2, 3)));
9221extern int pthread_cond_clockwait (pthread_cond_t *__restrict __cond,
9222 pthread_mutex_t *__restrict __mutex,
9223 __clockid_t __clock_id,
9224 const struct timespec *__restrict __abstime)
9225 __attribute__ ((__nonnull__ (1, 2, 4)));
9226extern int pthread_condattr_init (pthread_condattr_t *__attr)
9227 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9228extern int pthread_condattr_destroy (pthread_condattr_t *__attr)
9229 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9230extern int pthread_condattr_getpshared (const pthread_condattr_t *
9231 __restrict __attr,
9232 int *__restrict __pshared)
9233 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
9234extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
9235 int __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9236extern int pthread_condattr_getclock (const pthread_condattr_t *
9237 __restrict __attr,
9238 __clockid_t *__restrict __clock_id)
9239 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
9240extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
9241 __clockid_t __clock_id)
9242 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9243extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
9244 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9245extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
9246 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9247extern int pthread_spin_lock (pthread_spinlock_t *__lock)
9248 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
9249extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
9250 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
9251extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
9252 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
9253extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
9254 const pthread_barrierattr_t *__restrict
9255 __attr, unsigned int __count)
9256 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9257extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
9258 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9259extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
9260 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
9261extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)
9262 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9263extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)
9264 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9265extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *
9266 __restrict __attr,
9267 int *__restrict __pshared)
9268 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
9269extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
9270 int __pshared)
9271 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9272extern int pthread_key_create (pthread_key_t *__key,
9273 void (*__destr_function) (void *))
9274 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
9275extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__));
9276extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__));
9277extern int pthread_setspecific (pthread_key_t __key,
9278 const void *__pointer)
9279 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__access__ (__none__, 2)));
9280extern int pthread_getcpuclockid (pthread_t __thread_id,
9281 __clockid_t *__clock_id)
9282 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
9283extern int pthread_atfork (void (*__prepare) (void),
9284 void (*__parent) (void),
9285 void (*__child) (void)) __attribute__ ((__nothrow__ , __leaf__));
9286extern __inline __attribute__ ((__gnu_inline__)) int
9287__attribute__ ((__nothrow__ , __leaf__)) pthread_equal (pthread_t __thread1, pthread_t __thread2)
9288{
9289 return __thread1 == __thread2;
9290}
9291
9292typedef pthread_t rb_nativethread_id_t;
9293typedef pthread_mutex_t rb_nativethread_lock_t;
9294typedef pthread_cond_t rb_nativethread_cond_t;
9295
9296
9297rb_nativethread_id_t rb_nativethread_self(void);
9298void rb_nativethread_lock_initialize(rb_nativethread_lock_t *lock);
9299void rb_nativethread_lock_destroy(rb_nativethread_lock_t *lock);
9300void rb_nativethread_lock_lock(rb_nativethread_lock_t *lock);
9301void rb_nativethread_lock_unlock(rb_nativethread_lock_t *lock);
9302void rb_native_mutex_lock(rb_nativethread_lock_t *lock);
9303int rb_native_mutex_trylock(rb_nativethread_lock_t *lock);
9304void rb_native_mutex_unlock(rb_nativethread_lock_t *lock);
9305void rb_native_mutex_initialize(rb_nativethread_lock_t *lock);
9306void rb_native_mutex_destroy(rb_nativethread_lock_t *lock);
9307void rb_native_cond_signal(rb_nativethread_cond_t *cond);
9308void rb_native_cond_broadcast(rb_nativethread_cond_t *cond);
9309void rb_native_cond_wait(rb_nativethread_cond_t *cond, rb_nativethread_lock_t *mutex);
9310void rb_native_cond_timedwait(rb_nativethread_cond_t *cond, rb_nativethread_lock_t *mutex, unsigned long msec);
9311void rb_native_cond_initialize(rb_nativethread_cond_t *cond);
9312void rb_native_cond_destroy(rb_nativethread_cond_t *cond);
9313
9314
9315void *rb_allocate_sigaltstack(void);
9316void *rb_register_sigaltstack(void *);
9317struct rb_thread_sched_item {
9318 union {
9319 struct ccan_list_node ubf;
9320 struct ccan_list_node readyq;
9321 } node;
9322};
9323struct rb_native_thread {
9324 int id;
9325 rb_nativethread_id_t thread_id;
9326 int tid;
9327 struct rb_thread_struct *running_thread;
9328 union
9329 {
9330 rb_nativethread_cond_t intr;
9331 rb_nativethread_cond_t readyq;
9332 } cond;
9333 void *altstack;
9334};
9335struct rb_thread_sched {
9336 const struct rb_thread_struct *running;
9337 rb_nativethread_lock_t lock;
9338 struct ccan_list_head readyq;
9339 const struct rb_thread_struct *timer;
9340 int timer_err;
9341 rb_nativethread_cond_t switch_cond;
9342 rb_nativethread_cond_t switch_wait_cond;
9343 int need_yield;
9344 int wait_yield;
9345};
9346
9347
9348 extern __thread struct rb_execution_context_struct *ruby_current_ec;
9349
9350
9351void rb_vm_encoded_insn_data_table_init(void);
9352typedef unsigned long rb_num_t;
9353typedef signed long rb_snum_t;
9354enum ruby_tag_type {
9355 RUBY_TAG_NONE = 0x0,
9356 RUBY_TAG_RETURN = 0x1,
9357 RUBY_TAG_BREAK = 0x2,
9358 RUBY_TAG_NEXT = 0x3,
9359 RUBY_TAG_RETRY = 0x4,
9360 RUBY_TAG_REDO = 0x5,
9361 RUBY_TAG_RAISE = 0x6,
9362 RUBY_TAG_THROW = 0x7,
9363 RUBY_TAG_FATAL = 0x8,
9364 RUBY_TAG_MASK = 0xf
9365};
9366enum ruby_vm_throw_flags {
9367 VM_THROW_NO_ESCAPE_FLAG = 0x8000,
9368 VM_THROW_STATE_MASK = 0xff
9369};
9370struct rb_thread_struct;
9371struct rb_control_frame_struct;
9372typedef struct rb_compile_option_struct rb_compile_option_t;
9373union ic_serial_entry {
9374 rb_serial_t raw;
9375 VALUE data[2];
9376};
9377struct iseq_inline_constant_cache_entry {
9378 VALUE flags;
9379 VALUE value;
9380 VALUE _unused1;
9381 VALUE _unused2;
9382 const rb_cref_t *ic_cref;
9383};
9384__extension__ _Static_assert((__builtin_offsetof (struct iseq_inline_constant_cache_entry, ic_cref) + sizeof(const rb_cref_t *)) <= sizeof(struct RObject), "sizeof_iseq_inline_constant_cache_entry" ": " "(offsetof(struct iseq_inline_constant_cache_entry, ic_cref) + sizeof(const rb_cref_t *)) <= sizeof(struct RObject)");
9385struct iseq_inline_constant_cache {
9386 struct iseq_inline_constant_cache_entry *entry;
9387 unsigned get_insn_idx;
9388};
9389struct iseq_inline_iv_cache_entry {
9390 struct rb_iv_index_tbl_entry *entry;
9391};
9392struct iseq_inline_cvar_cache_entry {
9393 struct rb_cvar_class_tbl_entry *entry;
9394};
9395union iseq_inline_storage_entry {
9396 struct {
9397 struct rb_thread_struct *running_thread;
9398 VALUE value;
9399 } once;
9400 struct iseq_inline_constant_cache ic_cache;
9401 struct iseq_inline_iv_cache_entry iv_cache;
9402};
9403struct rb_calling_info {
9404 const struct rb_callinfo *ci;
9405 const struct rb_callcache *cc;
9406 VALUE block_handler;
9407 VALUE recv;
9408 int argc;
9409 int kw_splat;
9410};
9411struct rb_execution_context_struct;
9412typedef struct rb_iseq_location_struct {
9413 VALUE pathobj;
9414 VALUE base_label;
9415 VALUE label;
9416 VALUE first_lineno;
9417 int node_id;
9418 rb_code_location_t code_location;
9419} rb_iseq_location_t;
9420static inline VALUE
9421pathobj_path(VALUE pathobj)
9422{
9423 if (RB_TYPE_P(pathobj, RUBY_T_STRING)) {
9424 return pathobj;
9425 }
9426 else {
9427 ((void)0);
9428 return RARRAY_AREF(pathobj, 0);
9429 }
9430}
9431static inline VALUE
9432pathobj_realpath(VALUE pathobj)
9433{
9434 if (RB_TYPE_P(pathobj, RUBY_T_STRING)) {
9435 return pathobj;
9436 }
9437 else {
9438 ((void)0);
9439 return RARRAY_AREF(pathobj, 1);
9440 }
9441}
9442struct rb_mjit_unit;
9443struct rb_iseq_constant_body {
9444 enum iseq_type {
9445 ISEQ_TYPE_TOP,
9446 ISEQ_TYPE_METHOD,
9447 ISEQ_TYPE_BLOCK,
9448 ISEQ_TYPE_CLASS,
9449 ISEQ_TYPE_RESCUE,
9450 ISEQ_TYPE_ENSURE,
9451 ISEQ_TYPE_EVAL,
9452 ISEQ_TYPE_MAIN,
9453 ISEQ_TYPE_PLAIN
9454 } type;
9455 unsigned int iseq_size;
9456 VALUE *iseq_encoded;
9457 struct {
9458 struct {
9459 unsigned int has_lead : 1;
9460 unsigned int has_opt : 1;
9461 unsigned int has_rest : 1;
9462 unsigned int has_post : 1;
9463 unsigned int has_kw : 1;
9464 unsigned int has_kwrest : 1;
9465 unsigned int has_block : 1;
9466 unsigned int ambiguous_param0 : 1;
9467 unsigned int accepts_no_kwarg : 1;
9468 unsigned int ruby2_keywords: 1;
9469 } flags;
9470 unsigned int size;
9471 int lead_num;
9472 int opt_num;
9473 int rest_start;
9474 int post_start;
9475 int post_num;
9476 int block_start;
9477 const VALUE *opt_table;
9478 const struct rb_iseq_param_keyword {
9479 int num;
9480 int required_num;
9481 int bits_start;
9482 int rest_start;
9483 const ID *table;
9484 VALUE *default_values;
9485 } *keyword;
9486 } param;
9487 rb_iseq_location_t location;
9488 struct iseq_insn_info {
9489 const struct iseq_insn_info_entry *body;
9490 unsigned int *positions;
9491 unsigned int size;
9492 struct succ_index_table *succ_index_table;
9493 } insns_info;
9494 const ID *local_table;
9495 struct iseq_catch_table *catch_table;
9496 const struct rb_iseq_struct *parent_iseq;
9497 struct rb_iseq_struct *local_iseq;
9498 union iseq_inline_storage_entry *is_entries;
9499 struct rb_call_data *call_data;
9500 struct {
9501 rb_snum_t flip_count;
9502 VALUE script_lines;
9503 VALUE coverage;
9504 VALUE pc2branchindex;
9505 VALUE *original_iseq;
9506 } variable;
9507 unsigned int local_table_size;
9508 unsigned int is_size;
9509 unsigned int ci_size;
9510 unsigned int stack_max;
9511 char catch_except_p;
9512 _Bool builtin_inline_p;
9513 struct rb_id_table *outer_variables;
9514 const rb_iseq_t *mandatory_only_iseq;
9515 VALUE (*jit_func)(struct rb_execution_context_struct *,
9516 struct rb_control_frame_struct *);
9517 long unsigned total_calls;
9518 struct rb_mjit_unit *jit_unit;
9519};
9520struct rb_iseq_struct {
9521 VALUE flags;
9522 VALUE wrapper;
9523 struct rb_iseq_constant_body *body;
9524 union {
9525 struct iseq_compile_data *compile_data;
9526 struct {
9527 VALUE obj;
9528 int index;
9529 } loader;
9530 struct {
9531 struct rb_hook_list_struct *local_hooks;
9532 rb_event_flag_t global_trace_events;
9533 } exec;
9534 } aux;
9535};
9536static inline const rb_iseq_t *
9537rb_iseq_check(const rb_iseq_t *iseq)
9538{
9539 return iseq;
9540}
9541static inline const rb_iseq_t *
9542def_iseq_ptr(rb_method_definition_t *def)
9543{
9544 return rb_iseq_check(def->body.iseq.iseqptr);
9545}
9546enum ruby_special_exceptions {
9547 ruby_error_reenter,
9548 ruby_error_nomemory,
9549 ruby_error_sysstack,
9550 ruby_error_stackfatal,
9551 ruby_error_stream_closed,
9552 ruby_special_error_count
9553};
9554enum ruby_basic_operators {
9555 BOP_PLUS,
9556 BOP_MINUS,
9557 BOP_MULT,
9558 BOP_DIV,
9559 BOP_MOD,
9560 BOP_EQ,
9561 BOP_EQQ,
9562 BOP_LT,
9563 BOP_LE,
9564 BOP_LTLT,
9565 BOP_AREF,
9566 BOP_ASET,
9567 BOP_LENGTH,
9568 BOP_SIZE,
9569 BOP_EMPTY_P,
9570 BOP_NIL_P,
9571 BOP_SUCC,
9572 BOP_GT,
9573 BOP_GE,
9574 BOP_NOT,
9575 BOP_NEQ,
9576 BOP_MATCH,
9577 BOP_FREEZE,
9578 BOP_UMINUS,
9579 BOP_MAX,
9580 BOP_MIN,
9581 BOP_HASH,
9582 BOP_CALL,
9583 BOP_AND,
9584 BOP_OR,
9585 BOP_LAST_
9586};
9587struct rb_vm_struct;
9588typedef void rb_vm_at_exit_func(struct rb_vm_struct*);
9589typedef struct rb_at_exit_list {
9590 rb_vm_at_exit_func *func;
9591 struct rb_at_exit_list *next;
9592} rb_at_exit_list;
9593struct rb_objspace;
9594struct rb_objspace *rb_objspace_alloc(void);
9595void rb_objspace_free(struct rb_objspace *);
9596void rb_objspace_call_finalizer(struct rb_objspace *);
9597typedef struct rb_hook_list_struct {
9598 struct rb_event_hook_struct *hooks;
9599 rb_event_flag_t events;
9600 unsigned int running;
9601 _Bool need_clean;
9602 _Bool is_local;
9603} rb_hook_list_t;
9604typedef const struct rb_builtin_function *RB_BUILTIN;
9605typedef struct rb_vm_struct {
9606 VALUE self;
9607 struct {
9608 struct ccan_list_head set;
9609 unsigned int cnt;
9610 unsigned int blocking_cnt;
9611 struct rb_ractor_struct *main_ractor;
9612 struct rb_thread_struct *main_thread;
9613 struct {
9614 rb_nativethread_lock_t lock;
9615 struct rb_ractor_struct *lock_owner;
9616 unsigned int lock_rec;
9617 _Bool barrier_waiting;
9618 unsigned int barrier_cnt;
9619 rb_nativethread_cond_t barrier_cond;
9620 rb_nativethread_cond_t terminate_cond;
9621 _Bool terminate_waiting;
9622 } sync;
9623 } ractor;
9624 void *main_altstack;
9625 rb_serial_t fork_gen;
9626 rb_nativethread_lock_t waitpid_lock;
9627 struct ccan_list_head waiting_pids;
9628 struct ccan_list_head waiting_grps;
9629 struct ccan_list_head waiting_fds;
9630 volatile int ubf_async_safe;
9631 unsigned int running: 1;
9632 unsigned int thread_abort_on_exception: 1;
9633 unsigned int thread_report_on_exception: 1;
9634 unsigned int thread_ignore_deadlock: 1;
9635 VALUE mark_object_ary;
9636 const VALUE special_exceptions[ruby_special_error_count];
9637 VALUE top_self;
9638 VALUE load_path;
9639 VALUE load_path_snapshot;
9640 VALUE load_path_check_cache;
9641 VALUE expanded_load_path;
9642 VALUE loaded_features;
9643 VALUE loaded_features_snapshot;
9644 VALUE loaded_features_realpaths;
9645 struct st_table *loaded_features_index;
9646 struct st_table *loading_table;
9647 struct {
9648 VALUE cmd[(64 + 1)];
9649 } trap_list;
9650 struct st_table *ensure_rollback_table;
9651 struct rb_postponed_job_struct *postponed_job_buffer;
9652 rb_atomic_t postponed_job_index;
9653 int src_encoding_index;
9654 struct ccan_list_head workqueue;
9655 rb_nativethread_lock_t workqueue_lock;
9656 VALUE orig_progname, progname;
9657 VALUE coverages, me2counter;
9658 int coverage_mode;
9659 st_table * defined_module_hash;
9660 struct rb_objspace *objspace;
9661 rb_at_exit_list *at_exit;
9662 st_table *frozen_strings;
9663 const struct rb_builtin_function *builtin_function_table;
9664 int builtin_inline_index;
9665 struct rb_id_table *negative_cme_table;
9666 st_table *overloaded_cme_table;
9667 struct rb_id_table *constant_cache;
9668 const struct rb_callcache *global_cc_cache_table[1023];
9669 struct {
9670 size_t thread_vm_stack_size;
9671 size_t thread_machine_stack_size;
9672 size_t fiber_vm_stack_size;
9673 size_t fiber_machine_stack_size;
9674 } default_params;
9675 short redefined_flag[BOP_LAST_];
9676} rb_vm_t;
9677struct rb_captured_block {
9678 VALUE self;
9679 const VALUE *ep;
9680 union {
9681 const rb_iseq_t *iseq;
9682 const struct vm_ifunc *ifunc;
9683 VALUE val;
9684 } code;
9685};
9686enum rb_block_handler_type {
9687 block_handler_type_iseq,
9688 block_handler_type_ifunc,
9689 block_handler_type_symbol,
9690 block_handler_type_proc
9691};
9692enum rb_block_type {
9693 block_type_iseq,
9694 block_type_ifunc,
9695 block_type_symbol,
9696 block_type_proc
9697};
9698struct rb_block {
9699 union {
9700 struct rb_captured_block captured;
9701 VALUE symbol;
9702 VALUE proc;
9703 } as;
9704 enum rb_block_type type;
9705};
9706typedef struct rb_control_frame_struct {
9707 const VALUE *pc;
9708 VALUE *sp;
9709 const rb_iseq_t *iseq;
9710 VALUE self;
9711 const VALUE *ep;
9712 const void *block_code;
9713 VALUE *__bp__;
9714 void *jit_return;
9715} rb_control_frame_t;
9716extern const rb_data_type_t ruby_threadptr_data_type;
9717static inline struct rb_thread_struct *
9718rb_thread_ptr(VALUE thval)
9719{
9720 return (struct rb_thread_struct *)rb_check_typeddata(thval, &ruby_threadptr_data_type);
9721}
9722enum rb_thread_status {
9723 THREAD_RUNNABLE,
9724 THREAD_STOPPED,
9725 THREAD_STOPPED_FOREVER,
9726 THREAD_KILLED
9727};
9728typedef void *rb_jmpbuf_t[5];
9729struct rb_vm_tag {
9730 VALUE tag;
9731 VALUE retval;
9732 rb_jmpbuf_t buf;
9733 struct rb_vm_tag *prev;
9734 enum ruby_tag_type state;
9735 unsigned int lock_rec;
9736};
9737__extension__ _Static_assert(__builtin_offsetof (struct rb_vm_tag, buf) > 0, "rb_vm_tag_buf_offset" ": " "offsetof(struct rb_vm_tag, buf) > 0");
9738__extension__ _Static_assert(__builtin_offsetof (struct rb_vm_tag, buf) + sizeof(rb_jmpbuf_t) < sizeof(struct rb_vm_tag), "rb_vm_tag_buf_end" ": " "offsetof(struct rb_vm_tag, buf) + sizeof(rb_jmpbuf_t) < sizeof(struct rb_vm_tag)");
9739struct rb_unblock_callback {
9740 rb_unblock_function_t *func;
9741 void *arg;
9742};
9743struct rb_mutex_struct;
9744typedef struct rb_ensure_entry {
9745 VALUE marker;
9746 VALUE (*e_proc)(VALUE);
9747 VALUE data2;
9748} rb_ensure_entry_t;
9749typedef struct rb_ensure_list {
9750 struct rb_ensure_list *next;
9751 struct rb_ensure_entry entry;
9752} rb_ensure_list_t;
9753typedef struct rb_fiber_struct rb_fiber_t;
9754struct rb_waiting_list {
9755 struct rb_waiting_list *next;
9756 struct rb_thread_struct *thread;
9757 struct rb_fiber_struct *fiber;
9758};
9759struct rb_execution_context_struct {
9760 VALUE *vm_stack;
9761 size_t vm_stack_size;
9762 rb_control_frame_t *cfp;
9763 struct rb_vm_tag *tag;
9764 rb_atomic_t interrupt_flag;
9765 rb_atomic_t interrupt_mask;
9766 rb_fiber_t *fiber_ptr;
9767 struct rb_thread_struct *thread_ptr;
9768 struct rb_id_table *local_storage;
9769 VALUE local_storage_recursive_hash;
9770 VALUE local_storage_recursive_hash_for_trace;
9771 const VALUE *root_lep;
9772 VALUE root_svar;
9773 rb_ensure_list_t *ensure_list;
9774 struct rb_trace_arg_struct *trace_arg;
9775 VALUE errinfo;
9776 VALUE passed_block_handler;
9777 uint8_t raised_flag;
9778 enum method_missing_reason method_missing_reason : 8;
9779 VALUE private_const_reference;
9780 struct {
9781 VALUE *stack_start;
9782 VALUE *stack_end;
9783 size_t stack_maxsize;
9784 __attribute__((__aligned__(8))) jmp_buf regs;
9785 } machine;
9786};
9787typedef struct rb_execution_context_struct rb_execution_context_t;
9788void rb_ec_set_vm_stack(rb_execution_context_t *ec, VALUE *stack, size_t size);
9789void rb_ec_initialize_vm_stack(rb_execution_context_t *ec, VALUE *stack, size_t size);
9790void rb_ec_clear_vm_stack(rb_execution_context_t *ec);
9791struct rb_ext_config {
9792 _Bool ractor_safe;
9793};
9794typedef struct rb_ractor_struct rb_ractor_t;
9795struct rb_native_thread;
9796typedef struct rb_thread_struct {
9797 struct ccan_list_node lt_node;
9798 VALUE self;
9799 rb_ractor_t *ractor;
9800 rb_vm_t *vm;
9801 struct rb_native_thread *nt;
9802 rb_execution_context_t *ec;
9803 struct rb_thread_sched_item sched;
9804 rb_atomic_t serial;
9805 VALUE last_status;
9806 struct rb_calling_info *calling;
9807 VALUE top_self;
9808 VALUE top_wrapper;
9809 enum rb_thread_status status : 2;
9810 unsigned int locking_native_thread : 1;
9811 unsigned int to_kill : 1;
9812 unsigned int abort_on_exception: 1;
9813 unsigned int report_on_exception: 1;
9814 unsigned int pending_interrupt_queue_checked: 1;
9815 int8_t priority;
9816 uint32_t running_time_us;
9817 void *blocking_region_buffer;
9818 VALUE thgroup;
9819 VALUE value;
9820 VALUE pending_interrupt_queue;
9821 VALUE pending_interrupt_mask_stack;
9822 rb_nativethread_lock_t interrupt_lock;
9823 struct rb_unblock_callback unblock;
9824 VALUE locking_mutex;
9825 struct rb_mutex_struct *keeping_mutexes;
9826 struct rb_waiting_list *join_list;
9827 union {
9828 struct {
9829 VALUE proc;
9830 VALUE args;
9831 int kw_splat;
9832 } proc;
9833 struct {
9834 VALUE (*func)(void *);
9835 void *arg;
9836 } func;
9837 } invoke_arg;
9838 enum thread_invoke_type {
9839 thread_invoke_type_none = 0,
9840 thread_invoke_type_proc,
9841 thread_invoke_type_ractor_proc,
9842 thread_invoke_type_func
9843 } invoke_type;
9844 VALUE stat_insn_usage;
9845 rb_fiber_t *root_fiber;
9846 VALUE scheduler;
9847 unsigned blocking;
9848 VALUE name;
9849 struct rb_ext_config ext_config;
9850} rb_thread_t;
9851static inline unsigned int
9852rb_th_serial(const rb_thread_t *th)
9853{
9854 return (unsigned int)th->serial;
9855}
9856typedef enum {
9857 VM_DEFINECLASS_TYPE_CLASS = 0x00,
9858 VM_DEFINECLASS_TYPE_SINGLETON_CLASS = 0x01,
9859 VM_DEFINECLASS_TYPE_MODULE = 0x02,
9860 VM_DEFINECLASS_TYPE_MASK = 0x07
9861} rb_vm_defineclass_type_t;
9862
9863
9864rb_iseq_t *rb_iseq_new (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent, enum iseq_type);
9865rb_iseq_t *rb_iseq_new_top (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent);
9866rb_iseq_t *rb_iseq_new_main (const rb_ast_body_t *ast, VALUE path, VALUE realpath, const rb_iseq_t *parent, int opt);
9867rb_iseq_t *rb_iseq_new_eval (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, VALUE first_lineno, const rb_iseq_t *parent, int isolated_depth);
9868rb_iseq_t *rb_iseq_new_with_opt(const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, VALUE first_lineno, const rb_iseq_t *parent, int isolated_depth,
9869 enum iseq_type, const rb_compile_option_t*);
9870struct iseq_link_anchor;
9871struct rb_iseq_new_with_callback_callback_func {
9872 VALUE flags;
9873 VALUE reserved;
9874 void (*func)(rb_iseq_t *, struct iseq_link_anchor *, const void *);
9875 const void *data;
9876};
9877static inline struct rb_iseq_new_with_callback_callback_func *
9878rb_iseq_new_with_callback_new_callback(
9879 void (*func)(rb_iseq_t *, struct iseq_link_anchor *, const void *), const void *ptr)
9880{
9881 VALUE memo = rb_imemo_new(imemo_ifunc, (VALUE)func, (VALUE)ptr, ((VALUE)RUBY_Qundef), ((VALUE)RUBY_Qfalse));
9882 return (struct rb_iseq_new_with_callback_callback_func *)memo;
9883}
9884rb_iseq_t *rb_iseq_new_with_callback(const struct rb_iseq_new_with_callback_callback_func * ifunc,
9885 VALUE name, VALUE path, VALUE realpath, VALUE first_lineno,
9886 const rb_iseq_t *parent, enum iseq_type, const rb_compile_option_t*);
9887VALUE rb_iseq_disasm(const rb_iseq_t *iseq);
9888int rb_iseq_disasm_insn(VALUE str, const VALUE *iseqval, size_t pos, const rb_iseq_t *iseq, VALUE child);
9889VALUE rb_iseq_coverage(const rb_iseq_t *iseq);
9890extern VALUE rb_cISeq;
9891extern VALUE rb_cRubyVM;
9892extern VALUE rb_mRubyVMFrozenCore;
9893extern VALUE rb_block_param_proxy;
9894
9895
9896typedef struct {
9897 const struct rb_block block;
9898 unsigned int is_from_method: 1;
9899 unsigned int is_lambda: 1;
9900 unsigned int is_isolated: 1;
9901} rb_proc_t;
9902
9903
9904VALUE rb_proc_isolate(VALUE self);
9905VALUE rb_proc_isolate_bang(VALUE self);
9906VALUE rb_proc_ractor_make_shareable(VALUE self);
9907
9908
9909typedef struct {
9910 VALUE flags;
9911 rb_iseq_t *iseq;
9912 const VALUE *ep;
9913 const VALUE *env;
9914 unsigned int env_size;
9915} rb_env_t;
9916extern const rb_data_type_t ruby_binding_data_type;
9917typedef struct {
9918 const struct rb_block block;
9919 const VALUE pathobj;
9920 unsigned short first_lineno;
9921} rb_binding_t;
9922enum vm_check_match_type {
9923 VM_CHECKMATCH_TYPE_WHEN = 1,
9924 VM_CHECKMATCH_TYPE_CASE = 2,
9925 VM_CHECKMATCH_TYPE_RESCUE = 3
9926};
9927enum vm_special_object_type {
9928 VM_SPECIAL_OBJECT_VMCORE = 1,
9929 VM_SPECIAL_OBJECT_CBASE,
9930 VM_SPECIAL_OBJECT_CONST_BASE
9931};
9932enum vm_svar_index {
9933 VM_SVAR_LASTLINE = 0,
9934 VM_SVAR_BACKREF = 1,
9935 VM_SVAR_EXTRA_START = 2,
9936 VM_SVAR_FLIPFLOP_START = 2
9937};
9938typedef struct iseq_inline_constant_cache *IC;
9939typedef struct iseq_inline_iv_cache_entry *IVC;
9940typedef struct iseq_inline_cvar_cache_entry *ICVARC;
9941typedef union iseq_inline_storage_entry *ISE;
9942typedef const struct rb_callinfo *CALL_INFO;
9943typedef const struct rb_callcache *CALL_CACHE;
9944typedef struct rb_call_data *CALL_DATA;
9945typedef VALUE CDHASH;
9946typedef rb_control_frame_t *
9947 (*rb_insn_func_t)(rb_execution_context_t *, rb_control_frame_t *);
9948enum vm_frame_env_flags {
9949 VM_FRAME_MAGIC_METHOD = 0x11110001,
9950 VM_FRAME_MAGIC_BLOCK = 0x22220001,
9951 VM_FRAME_MAGIC_CLASS = 0x33330001,
9952 VM_FRAME_MAGIC_TOP = 0x44440001,
9953 VM_FRAME_MAGIC_CFUNC = 0x55550001,
9954 VM_FRAME_MAGIC_IFUNC = 0x66660001,
9955 VM_FRAME_MAGIC_EVAL = 0x77770001,
9956 VM_FRAME_MAGIC_RESCUE = 0x78880001,
9957 VM_FRAME_MAGIC_DUMMY = 0x79990001,
9958 VM_FRAME_MAGIC_MASK = 0x7fff0001,
9959 VM_FRAME_FLAG_FINISH = 0x0020,
9960 VM_FRAME_FLAG_BMETHOD = 0x0040,
9961 VM_FRAME_FLAG_CFRAME = 0x0080,
9962 VM_FRAME_FLAG_LAMBDA = 0x0100,
9963 VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM = 0x0200,
9964 VM_FRAME_FLAG_CFRAME_KW = 0x0400,
9965 VM_FRAME_FLAG_PASSED = 0x0800,
9966 VM_ENV_FLAG_LOCAL = 0x0002,
9967 VM_ENV_FLAG_ESCAPED = 0x0004,
9968 VM_ENV_FLAG_WB_REQUIRED = 0x0008,
9969 VM_ENV_FLAG_ISOLATED = 0x0010,
9970};
9971static inline void VM_FORCE_WRITE_SPECIAL_CONST(const VALUE *ptr, VALUE special_const_value);
9972static inline void
9973VM_ENV_FLAGS_SET(const VALUE *ep, VALUE flag)
9974{
9975 VALUE flags = ep[( 0)];
9976 ((void)0);
9977 VM_FORCE_WRITE_SPECIAL_CONST(&ep[( 0)], flags | flag);
9978}
9979static inline void
9980VM_ENV_FLAGS_UNSET(const VALUE *ep, VALUE flag)
9981{
9982 VALUE flags = ep[( 0)];
9983 ((void)0);
9984 VM_FORCE_WRITE_SPECIAL_CONST(&ep[( 0)], flags & ~flag);
9985}
9986static inline unsigned long
9987VM_ENV_FLAGS(const VALUE *ep, long flag)
9988{
9989 VALUE flags = ep[( 0)];
9990 ((void)0);
9991 return flags & flag;
9992}
9993static inline unsigned long
9994VM_FRAME_TYPE(const rb_control_frame_t *cfp)
9995{
9996 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_MAGIC_MASK);
9997}
9998static inline int
9999VM_FRAME_LAMBDA_P(const rb_control_frame_t *cfp)
10000{
10001 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_LAMBDA) != 0;
10002}
10003static inline int
10004VM_FRAME_CFRAME_KW_P(const rb_control_frame_t *cfp)
10005{
10006 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_CFRAME_KW) != 0;
10007}
10008static inline int
10009VM_FRAME_FINISHED_P(const rb_control_frame_t *cfp)
10010{
10011 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_FINISH) != 0;
10012}
10013static inline int
10014VM_FRAME_BMETHOD_P(const rb_control_frame_t *cfp)
10015{
10016 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_BMETHOD) != 0;
10017}
10018static inline int
10019rb_obj_is_iseq(VALUE iseq)
10020{
10021 return imemo_type_p(iseq, imemo_iseq);
10022}
10023static inline int
10024VM_FRAME_CFRAME_P(const rb_control_frame_t *cfp)
10025{
10026 int cframe_p = VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_CFRAME) != 0;
10027 ((void)0);
10028 return cframe_p;
10029}
10030static inline int
10031VM_FRAME_RUBYFRAME_P(const rb_control_frame_t *cfp)
10032{
10033 return !VM_FRAME_CFRAME_P(cfp);
10034}
10035static inline int
10036VM_ENV_LOCAL_P(const VALUE *ep)
10037{
10038 return VM_ENV_FLAGS(ep, VM_ENV_FLAG_LOCAL) ? 1 : 0;
10039}
10040static inline const VALUE *
10041VM_ENV_PREV_EP(const VALUE *ep)
10042{
10043 ((void)0);
10044 return ((void *)(((ep[(-1)])) & ~0x03));
10045}
10046static inline VALUE
10047VM_ENV_BLOCK_HANDLER(const VALUE *ep)
10048{
10049 ((void)0);
10050 return ep[(-1)];
10051}
10052static inline int
10053VM_ENV_ESCAPED_P(const VALUE *ep)
10054{
10055 ((void)0);
10056 return VM_ENV_FLAGS(ep, VM_ENV_FLAG_ESCAPED) ? 1 : 0;
10057}
10058__attribute__((__nonnull__ (1)))
10059static inline VALUE
10060VM_ENV_ENVVAL(const VALUE *ep)
10061{
10062 VALUE envval = ep[( 1)];
10063 ((void)0);
10064 ((void)0);
10065 return envval;
10066}
10067__attribute__((__nonnull__ (1)))
10068static inline const rb_env_t *
10069VM_ENV_ENVVAL_PTR(const VALUE *ep)
10070{
10071 return (const rb_env_t *)VM_ENV_ENVVAL(ep);
10072}
10073static inline const rb_env_t *
10074vm_env_new(VALUE *env_ep, VALUE *env_body, unsigned int env_size, const rb_iseq_t *iseq)
10075{
10076 rb_env_t *env = (rb_env_t *)rb_imemo_new(imemo_env, (VALUE)env_ep, (VALUE)env_body, 0, (VALUE)iseq);
10077 env->env_size = env_size;
10078 env_ep[( 1)] = (VALUE)env;
10079 return env;
10080}
10081static inline void
10082VM_FORCE_WRITE(const VALUE *ptr, VALUE v)
10083{
10084 *((VALUE *)ptr) = v;
10085}
10086static inline void
10087VM_FORCE_WRITE_SPECIAL_CONST(const VALUE *ptr, VALUE special_const_value)
10088{
10089 ((void)0);
10090 VM_FORCE_WRITE(ptr, special_const_value);
10091}
10092static inline void
10093VM_STACK_ENV_WRITE(const VALUE *ep, int index, VALUE v)
10094{
10095 ((void)0);
10096 VM_FORCE_WRITE(&ep[index], v);
10097}static inline
10098const VALUE *rb_vm_ep_local_ep(const VALUE *ep);
10099const VALUE *rb_vm_proc_local_ep(VALUE proc);static inline
10100void rb_vm_block_ep_update(VALUE obj, const struct rb_block *dst, const VALUE *ep);
10101void rb_vm_block_copy(VALUE obj, const struct rb_block *dst, const struct rb_block *src);static inline
10102VALUE rb_vm_frame_block_handler(const rb_control_frame_t *cfp);
10103static inline const rb_control_frame_t *
10104RUBY_VM_END_CONTROL_FRAME(const rb_execution_context_t *ec)
10105{
10106 return (rb_control_frame_t *)(ec->vm_stack + ec->vm_stack_size);
10107}
10108static inline int
10109RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
10110{
10111 return !((void *)(RUBY_VM_END_CONTROL_FRAME(ec)) > (void *)(cfp));
10112}
10113static inline int
10114VM_BH_ISEQ_BLOCK_P(VALUE block_handler)
10115{
10116 if ((block_handler & 0x03) == 0x01) {
10117 return 1;
10118 }
10119 else {
10120 return 0;
10121 }
10122}
10123static inline VALUE
10124VM_BH_FROM_ISEQ_BLOCK(const struct rb_captured_block *captured)
10125{
10126 VALUE block_handler = ((VALUE)(captured) | (0x01));
10127 ((void)0);
10128 return block_handler;
10129}
10130static inline const struct rb_captured_block *
10131VM_BH_TO_ISEQ_BLOCK(VALUE block_handler)
10132{
10133 struct rb_captured_block *captured = ((void *)((block_handler) & ~0x03));
10134 ((void)0);
10135 return captured;
10136}
10137static inline int
10138VM_BH_IFUNC_P(VALUE block_handler)
10139{
10140 if ((block_handler & 0x03) == 0x03) {
10141 return 1;
10142 }
10143 else {
10144 return 0;
10145 }
10146}
10147static inline VALUE
10148VM_BH_FROM_IFUNC_BLOCK(const struct rb_captured_block *captured)
10149{
10150 VALUE block_handler = ((VALUE)(captured) | (0x03));
10151 ((void)0);
10152 return block_handler;
10153}
10154static inline const struct rb_captured_block *
10155VM_BH_TO_IFUNC_BLOCK(VALUE block_handler)
10156{
10157 struct rb_captured_block *captured = ((void *)((block_handler) & ~0x03));
10158 ((void)0);
10159 return captured;
10160}
10161static inline const struct rb_captured_block *
10162VM_BH_TO_CAPT_BLOCK(VALUE block_handler)
10163{
10164 struct rb_captured_block *captured = ((void *)((block_handler) & ~0x03));
10165 ((void)0);
10166 return captured;
10167}
10168static inline enum rb_block_handler_type
10169vm_block_handler_type(VALUE block_handler)
10170{
10171 if (VM_BH_ISEQ_BLOCK_P(block_handler)) {
10172 return block_handler_type_iseq;
10173 }
10174 else if (VM_BH_IFUNC_P(block_handler)) {
10175 return block_handler_type_ifunc;
10176 }
10177 else if (RB_SYMBOL_P(block_handler)) {
10178 return block_handler_type_symbol;
10179 }
10180 else {
10181 ((void)0);
10182 return block_handler_type_proc;
10183 }
10184}
10185static inline void
10186vm_block_handler_verify(__attribute__ ((__unused__)) VALUE block_handler)
10187{
10188 ((void)0);
10189}
10190static inline int
10191vm_cfp_forwarded_bh_p(const rb_control_frame_t *cfp, VALUE block_handler)
10192{
10193 return ((VALUE) cfp->block_code) == block_handler;
10194}
10195static inline enum rb_block_type
10196vm_block_type(const struct rb_block *block)
10197{
10198 return block->type;
10199}
10200static inline void
10201vm_block_type_set(const struct rb_block *block, enum rb_block_type type)
10202{
10203 struct rb_block *mb = (struct rb_block *)block;
10204 mb->type = type;
10205}
10206static inline const struct rb_block *
10207vm_proc_block(VALUE procval)
10208{
10209 ((void)0);
10210 return &((rb_proc_t *)(((struct RTypedData *)(procval))->data))->block;
10211}
10212static inline const rb_iseq_t *vm_block_iseq(const struct rb_block *block);
10213static inline const VALUE *vm_block_ep(const struct rb_block *block);
10214static inline const rb_iseq_t *
10215vm_proc_iseq(VALUE procval)
10216{
10217 return vm_block_iseq(vm_proc_block(procval));
10218}
10219static inline const VALUE *
10220vm_proc_ep(VALUE procval)
10221{
10222 return vm_block_ep(vm_proc_block(procval));
10223}
10224static inline const rb_iseq_t *
10225vm_block_iseq(const struct rb_block *block)
10226{
10227 switch (vm_block_type(block)) {
10228 case block_type_iseq: return rb_iseq_check(block->as.captured.code.iseq);
10229 case block_type_proc: return vm_proc_iseq(block->as.proc);
10230 case block_type_ifunc:
10231 case block_type_symbol: return ((void *)0);
10232 }
10233 __builtin_unreachable();
10234 return ((void *)0);
10235}
10236static inline const VALUE *
10237vm_block_ep(const struct rb_block *block)
10238{
10239 switch (vm_block_type(block)) {
10240 case block_type_iseq:
10241 case block_type_ifunc: return block->as.captured.ep;
10242 case block_type_proc: return vm_proc_ep(block->as.proc);
10243 case block_type_symbol: return ((void *)0);
10244 }
10245 __builtin_unreachable();
10246 return ((void *)0);
10247}
10248static inline VALUE
10249vm_block_self(const struct rb_block *block)
10250{
10251 switch (vm_block_type(block)) {
10252 case block_type_iseq:
10253 case block_type_ifunc:
10254 return block->as.captured.self;
10255 case block_type_proc:
10256 return vm_block_self(vm_proc_block(block->as.proc));
10257 case block_type_symbol:
10258 return ((VALUE)RUBY_Qundef);
10259 }
10260 __builtin_unreachable();
10261 return ((VALUE)RUBY_Qundef);
10262}
10263static inline VALUE
10264VM_BH_TO_SYMBOL(VALUE block_handler)
10265{
10266 ((void)0);
10267 return block_handler;
10268}
10269static inline VALUE
10270VM_BH_FROM_SYMBOL(VALUE symbol)
10271{
10272 ((void)0);
10273 return symbol;
10274}
10275static inline VALUE
10276VM_BH_TO_PROC(VALUE block_handler)
10277{
10278 ((void)0);
10279 return block_handler;
10280}
10281static inline VALUE
10282VM_BH_FROM_PROC(VALUE procval)
10283{
10284 ((void)0);
10285 return procval;
10286}
10287VALUE rb_thread_alloc(VALUE klass);
10288VALUE rb_binding_alloc(VALUE klass);
10289VALUE rb_proc_alloc(VALUE klass);
10290VALUE rb_proc_dup(VALUE self);
10291extern void rb_vmdebug_stack_dump_raw(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
10292extern void rb_vmdebug_debug_print_pre(const rb_execution_context_t *ec, const rb_control_frame_t *cfp, const VALUE *_pc);
10293extern void rb_vmdebug_debug_print_post(const rb_execution_context_t *ec, const rb_control_frame_t *cfp
10294);
10295void rb_vm_bugreport(const void *);
10296typedef void (*ruby_sighandler_t)(int);
10297__attribute__((__format__(__printf__, 4, 5)))
10298__attribute__((__noreturn__)) void rb_bug_for_fatal_signal(ruby_sighandler_t default_sighandler, int sig, const void *, const char *fmt, ...);
10299
10300
10301VALUE rb_iseq_eval(const rb_iseq_t *iseq);
10302VALUE rb_iseq_eval_main(const rb_iseq_t *iseq);
10303VALUE rb_iseq_path(const rb_iseq_t *iseq);
10304VALUE rb_iseq_realpath(const rb_iseq_t *iseq);
10305
10306
10307VALUE rb_iseq_pathobj_new(VALUE path, VALUE realpath);
10308void rb_iseq_pathobj_set(const rb_iseq_t *iseq, VALUE path, VALUE realpath);
10309int rb_ec_frame_method_id_and_class(const rb_execution_context_t *ec, ID *idp, ID *called_idp, VALUE *klassp);
10310void rb_ec_setup_exception(const rb_execution_context_t *ec, VALUE mesg, VALUE cause);
10311VALUE rb_vm_invoke_proc(rb_execution_context_t *ec, rb_proc_t *proc, int argc, const VALUE *argv, int kw_splat, VALUE block_handler);
10312VALUE rb_vm_make_proc_lambda(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass, int8_t is_lambda);
10313static inline VALUE
10314rb_vm_make_proc(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass)
10315{
10316 return rb_vm_make_proc_lambda(ec, captured, klass, 0);
10317}
10318static inline VALUE
10319rb_vm_make_lambda(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass)
10320{
10321 return rb_vm_make_proc_lambda(ec, captured, klass, 1);
10322}
10323VALUE rb_vm_make_binding(const rb_execution_context_t *ec, const rb_control_frame_t *src_cfp);
10324VALUE rb_vm_env_local_variables(const rb_env_t *env);
10325const rb_env_t *rb_vm_env_prev_env(const rb_env_t *env);
10326const VALUE *rb_binding_add_dynavars(VALUE bindval, rb_binding_t *bind, int dyncount, const ID *dynvars);
10327void rb_vm_inc_const_missing_count(void);
10328VALUE rb_vm_call_kw(rb_execution_context_t *ec, VALUE recv, VALUE id, int argc,
10329 const VALUE *argv, const rb_callable_method_entry_t *me, int kw_splat);
10330static void rb_vm_pop_frame(rb_execution_context_t *ec);
10331void rb_thread_start_timer_thread(void);
10332void rb_thread_stop_timer_thread(void);
10333void rb_thread_reset_timer_thread(void);
10334void rb_thread_wakeup_timer_thread(int);
10335static inline void
10336rb_vm_living_threads_init(rb_vm_t *vm)
10337{
10338 ccan_list_head_init(&vm->waiting_fds);
10339 ccan_list_head_init(&vm->waiting_pids);
10340 ccan_list_head_init(&vm->workqueue);
10341 ccan_list_head_init(&vm->waiting_grps);
10342 ccan_list_head_init(&vm->ractor.set);
10343}
10344typedef int rb_backtrace_iter_func(void *, VALUE, int, VALUE);
10345rb_control_frame_t *rb_vm_get_ruby_level_next_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
10346rb_control_frame_t *rb_vm_get_binding_creatable_next_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
10347int rb_vm_get_sourceline(const rb_control_frame_t *);
10348void rb_vm_stack_to_heap(rb_execution_context_t *ec);
10349void ruby_thread_init_stack(rb_thread_t *th);
10350rb_thread_t * ruby_thread_from_native(void);
10351int ruby_thread_set_native(rb_thread_t *th);
10352int rb_vm_control_frame_id_and_class(const rb_control_frame_t *cfp, ID *idp, ID *called_idp, VALUE *klassp);
10353void rb_vm_rewind_cfp(rb_execution_context_t *ec, rb_control_frame_t *cfp);
10354static VALUE rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler);
10355void rb_vm_register_special_exception_str(enum ruby_special_exceptions sp, VALUE exception_class, VALUE mesg);
10356void rb_gc_mark_machine_stack(const rb_execution_context_t *ec);static inline
10357void rb_vm_rewrite_cref(rb_cref_t *node, VALUE old_klass, VALUE new_klass, rb_cref_t **new_cref_ptr);
10358static const rb_callable_method_entry_t *rb_vm_frame_method_entry(const rb_control_frame_t *cfp);
10359VALUE rb_catch_protect(VALUE t, rb_block_call_func *func, VALUE data, enum ruby_tag_type *stateptr);
10360rb_execution_context_t *rb_vm_main_ractor_ec(rb_vm_t *vm);
10361
10362
10363extern struct rb_ractor_struct *ruby_single_main_ractor;
10364extern rb_vm_t *ruby_current_vm_ptr;
10365extern rb_event_flag_t ruby_vm_event_flags;
10366extern rb_event_flag_t ruby_vm_event_enabled_global_flags;
10367extern unsigned int ruby_vm_event_local_num;
10368
10369
10370static inline rb_thread_t *
10371rb_ec_thread_ptr(const rb_execution_context_t *ec)
10372{
10373 return ec->thread_ptr;
10374}
10375static inline rb_ractor_t *
10376rb_ec_ractor_ptr(const rb_execution_context_t *ec)
10377{
10378 const rb_thread_t *th = rb_ec_thread_ptr(ec);
10379 if (th) {
10380 ((void)0);
10381 return th->ractor;
10382 }
10383 else {
10384 return ((void *)0);
10385 }
10386}
10387static inline rb_vm_t *
10388rb_ec_vm_ptr(const rb_execution_context_t *ec)
10389{
10390 const rb_thread_t *th = rb_ec_thread_ptr(ec);
10391 if (th) {
10392 return th->vm;
10393 }
10394 else {
10395 return ((void *)0);
10396 }
10397}
10398static inline rb_execution_context_t *
10399rb_current_execution_context(_Bool expect_ec)
10400{
10401 rb_execution_context_t *ec = ruby_current_ec;
10402 ((void)0);
10403 return ec;
10404}
10405static inline rb_thread_t *
10406rb_current_thread(void)
10407{
10408 const rb_execution_context_t *ec = rb_current_execution_context(1);
10409 return rb_ec_thread_ptr(ec);
10410}
10411static inline rb_ractor_t *
10412rb_current_ractor(void)
10413{
10414 if (ruby_single_main_ractor) {
10415 return ruby_single_main_ractor;
10416 }
10417 else {
10418 const rb_execution_context_t *ec = rb_current_execution_context(1);
10419 return rb_ec_ractor_ptr(ec);
10420 }
10421}
10422static inline rb_vm_t *
10423rb_current_vm(void)
10424{
10425 return ruby_current_vm_ptr;
10426}
10427void rb_ec_vm_lock_rec_release(const rb_execution_context_t *ec,
10428 unsigned int recorded_lock_rec,
10429 unsigned int current_lock_rec);
10430static inline unsigned int
10431rb_ec_vm_lock_rec(const rb_execution_context_t *ec)
10432{
10433 rb_vm_t *vm = rb_ec_vm_ptr(ec);
10434 if (vm->ractor.sync.lock_owner != rb_ec_ractor_ptr(ec)) {
10435 return 0;
10436 }
10437 else {
10438 return vm->ractor.sync.lock_rec;
10439 }
10440}
10441enum {
10442 TIMER_INTERRUPT_MASK = 0x01,
10443 PENDING_INTERRUPT_MASK = 0x02,
10444 POSTPONED_JOB_INTERRUPT_MASK = 0x04,
10445 TRAP_INTERRUPT_MASK = 0x08,
10446 TERMINATE_INTERRUPT_MASK = 0x10,
10447 VM_BARRIER_INTERRUPT_MASK = 0x20,
10448};
10449static inline _Bool
10450RUBY_VM_INTERRUPTED_ANY(rb_execution_context_t *ec)
10451{
10452 return ec->interrupt_flag & ~(ec)->interrupt_mask;
10453}
10454VALUE rb_exc_set_backtrace(VALUE exc, VALUE bt);
10455int rb_signal_buff_size(void);
10456int rb_signal_exec(rb_thread_t *th, int sig);
10457void rb_threadptr_check_signal(rb_thread_t *mth);
10458void rb_threadptr_signal_raise(rb_thread_t *th, int sig);
10459void rb_threadptr_signal_exit(rb_thread_t *th);
10460int rb_threadptr_execute_interrupts(rb_thread_t *, int);
10461void rb_threadptr_interrupt(rb_thread_t *th);
10462void rb_threadptr_unlock_all_locking_mutexes(rb_thread_t *th);
10463void rb_threadptr_pending_interrupt_clear(rb_thread_t *th);
10464void rb_threadptr_pending_interrupt_enque(rb_thread_t *th, VALUE v);
10465VALUE rb_ec_get_errinfo(const rb_execution_context_t *ec);
10466void rb_ec_error_print(rb_execution_context_t * volatile ec, volatile VALUE errinfo);
10467void rb_execution_context_update(const rb_execution_context_t *ec);
10468void rb_execution_context_mark(const rb_execution_context_t *ec);
10469void rb_fiber_close(rb_fiber_t *fib);
10470void Init_native_thread(rb_thread_t *th);
10471int rb_vm_check_ints_blocking(rb_execution_context_t *ec);
10472void rb_vm_cond_wait(rb_vm_t *vm, rb_nativethread_cond_t *cond);
10473void rb_vm_cond_timedwait(rb_vm_t *vm, rb_nativethread_cond_t *cond, unsigned long msec);
10474static inline void
10475rb_vm_check_ints(rb_execution_context_t *ec)
10476{
10477 ((void)0);
10478 if ((__builtin_expect(!!(RUBY_VM_INTERRUPTED_ANY(ec)), 0))) {
10479 rb_threadptr_execute_interrupts(rb_ec_thread_ptr(ec), 0);
10480 }
10481}
10482struct rb_trace_arg_struct {
10483 rb_event_flag_t event;
10484 rb_execution_context_t *ec;
10485 const rb_control_frame_t *cfp;
10486 VALUE self;
10487 ID id;
10488 ID called_id;
10489 VALUE klass;
10490 VALUE data;
10491 int klass_solved;
10492 int lineno;
10493 VALUE path;
10494};
10495void rb_hook_list_mark(rb_hook_list_t *hooks);
10496void rb_hook_list_free(rb_hook_list_t *hooks);
10497void rb_hook_list_connect_tracepoint(VALUE target, rb_hook_list_t *list, VALUE tpval, unsigned int target_line);
10498void rb_hook_list_remove_tracepoint(rb_hook_list_t *list, VALUE tpval);
10499void rb_exec_event_hooks(struct rb_trace_arg_struct *trace_arg, rb_hook_list_t *hooks, int pop_p);
10500static inline void
10501rb_exec_event_hook_orig(rb_execution_context_t *ec, rb_hook_list_t *hooks, rb_event_flag_t flag,
10502 VALUE self, ID id, ID called_id, VALUE klass, VALUE data, int pop_p)
10503{
10504 struct rb_trace_arg_struct trace_arg;
10505 ((void)0);
10506 trace_arg.event = flag;
10507 trace_arg.ec = ec;
10508 trace_arg.cfp = ec->cfp;
10509 trace_arg.self = self;
10510 trace_arg.id = id;
10511 trace_arg.called_id = called_id;
10512 trace_arg.klass = klass;
10513 trace_arg.data = data;
10514 trace_arg.path = ((VALUE)RUBY_Qundef);
10515 trace_arg.klass_solved = 0;
10516 rb_exec_event_hooks(&trace_arg, hooks, pop_p);
10517}
10518struct rb_ractor_pub {
10519 VALUE self;
10520 uint32_t id;
10521 rb_hook_list_t hooks;
10522};
10523static inline rb_hook_list_t *
10524rb_ec_ractor_hooks(const rb_execution_context_t *ec)
10525{
10526 struct rb_ractor_pub *cr_pub = (struct rb_ractor_pub *)rb_ec_ractor_ptr(ec);
10527 return &cr_pub->hooks;
10528}
10529static inline void
10530rb_exec_event_hook_script_compiled(rb_execution_context_t *ec, const rb_iseq_t *iseq, VALUE eval_script)
10531{
10532 do { const rb_event_flag_t flag_arg_ = (0x2000); rb_hook_list_t *hooks_arg_ = (rb_ec_ractor_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, ec->cfp->self, 0, 0, 0, RB_NIL_P(eval_script) ? (VALUE)iseq : __extension__ ({ const VALUE args_to_new_ary[] = {eval_script, (VALUE)iseq}; if (__builtin_constant_p(2)) { __extension__ _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (2), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (2)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); }), 0); } } while (0);
10533}
10534void rb_vm_trap_exit(rb_vm_t *vm);
10535
10536
10537int rb_thread_check_trap_pending(void);
10538extern VALUE rb_get_coverages(void);
10539extern void rb_set_coverages(VALUE, int, VALUE);
10540extern void rb_clear_coverages(void);
10541extern void rb_reset_coverages(void);
10542extern void rb_resume_coverages(void);
10543extern void rb_suspend_coverages(void);
10544void rb_postponed_job_flush(rb_vm_t *vm);
10545extern VALUE rb_eRactorUnsafeError;
10546extern VALUE rb_eRactorIsolationError;
10547
10548
10549static inline void
10550vm_passed_block_handler_set(rb_execution_context_t *ec, VALUE block_handler)
10551{
10552 vm_block_handler_verify(block_handler);
10553 ec->passed_block_handler = block_handler;
10554}
10555static inline void
10556pass_passed_block_handler(rb_execution_context_t *ec)
10557{
10558 VALUE block_handler = rb_vm_frame_block_handler(ec->cfp);
10559 vm_passed_block_handler_set(ec, block_handler);
10560 VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_PASSED);
10561}
10562
10563extern int *__errno_location (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
10564extern char *program_invocation_name;
10565extern char *program_invocation_short_name;
10566typedef int error_t;
10567
10568static inline void
10569rb_ec_vm_lock_rec_check(const rb_execution_context_t *ec, unsigned int recorded_lock_rec)
10570{
10571 unsigned int current_lock_rec = rb_ec_vm_lock_rec(ec);
10572 if (current_lock_rec != recorded_lock_rec) {
10573 rb_ec_vm_lock_rec_release(ec, recorded_lock_rec, current_lock_rec);
10574 }
10575}
10576static inline int
10577rb_ec_tag_state(const rb_execution_context_t *ec)
10578{
10579 struct rb_vm_tag *tag = ec->tag;
10580 enum ruby_tag_type state = tag->state;
10581 tag->state = RUBY_TAG_NONE;
10582 rb_ec_vm_lock_rec_check(ec, tag->lock_rec);
10583 return state;
10584}
10585__attribute__((__noreturn__)) static inline void rb_ec_tag_jump(const rb_execution_context_t *ec, enum ruby_tag_type st);
10586static inline void
10587rb_ec_tag_jump(const rb_execution_context_t *ec, enum ruby_tag_type st)
10588{
10589 ec->tag->state = st;
10590 __builtin_longjmp(((ec->tag->buf)),(1));
10591}
10592static inline int CREF_SINGLETON(const rb_cref_t *cref);
10593static inline VALUE
10594CREF_CLASS(const rb_cref_t *cref)
10595{
10596 if (CREF_SINGLETON(cref)) {
10597 return rb_class_of(cref->klass_or_self);
10598 }
10599 else {
10600 return cref->klass_or_self;
10601 }
10602}
10603static inline VALUE
10604CREF_CLASS_FOR_DEFINITION(const rb_cref_t *cref)
10605{
10606 if (CREF_SINGLETON(cref)) {
10607 return rb_singleton_class(cref->klass_or_self);
10608 }
10609 else {
10610 return cref->klass_or_self;
10611 }
10612}
10613static inline rb_cref_t *
10614CREF_NEXT(const rb_cref_t *cref)
10615{
10616 return cref->next;
10617}
10618static inline const rb_scope_visibility_t *
10619CREF_SCOPE_VISI(const rb_cref_t *cref)
10620{
10621 return &cref->scope_visi;
10622}
10623static inline VALUE
10624CREF_REFINEMENTS(const rb_cref_t *cref)
10625{
10626 return cref->refinements;
10627}
10628static inline void
10629CREF_REFINEMENTS_SET(rb_cref_t *cref, VALUE refs)
10630{
10631 rb_obj_write((VALUE)(cref), __extension__({
10632 ;
10633 ; __typeof__((VALUE *)(&cref->refinements)) unaligned_member_access_result = ((VALUE *)(&cref->refinements));
10634 ; unaligned_member_access_result; }), (VALUE)(refs), "./eval_intern.h", 227);
10635}
10636static inline int
10637CREF_PUSHED_BY_EVAL(const rb_cref_t *cref)
10638{
10639 return cref->flags & ((VALUE)RUBY_FL_USER5);
10640}
10641static inline void
10642CREF_PUSHED_BY_EVAL_SET(rb_cref_t *cref)
10643{
10644 cref->flags |= ((VALUE)RUBY_FL_USER5);
10645}
10646static inline int
10647CREF_SINGLETON(const rb_cref_t *cref)
10648{
10649 return cref->flags & ((VALUE)RUBY_FL_USER7);
10650}
10651static inline void
10652CREF_SINGLETON_SET(rb_cref_t *cref)
10653{
10654 cref->flags |= ((VALUE)RUBY_FL_USER7);
10655}
10656static inline int
10657CREF_OMOD_SHARED(const rb_cref_t *cref)
10658{
10659 return cref->flags & ((VALUE)RUBY_FL_USER6);
10660}
10661static inline void
10662CREF_OMOD_SHARED_SET(rb_cref_t *cref)
10663{
10664 cref->flags |= ((VALUE)RUBY_FL_USER6);
10665}
10666static inline void
10667CREF_OMOD_SHARED_UNSET(rb_cref_t *cref)
10668{
10669 cref->flags &= ~((VALUE)RUBY_FL_USER6);
10670}
10671enum {
10672 RAISED_EXCEPTION = 1,
10673 RAISED_STACKOVERFLOW = 2,
10674 RAISED_NOMEMORY = 4
10675};
10676int rb_ec_set_raised(rb_execution_context_t *ec);
10677int rb_ec_reset_raised(rb_execution_context_t *ec);
10678int rb_ec_stack_check(rb_execution_context_t *ec);
10679VALUE rb_f_eval(int argc, const VALUE *argv, VALUE self);
10680VALUE rb_make_exception(int argc, const VALUE *argv);
10681__attribute__((__noreturn__)) void rb_method_name_error(VALUE, VALUE);
10682__attribute__((__noreturn__)) void rb_fiber_start(rb_fiber_t*);
10683__attribute__((__noreturn__)) void rb_print_undef(VALUE, ID, rb_method_visibility_t);
10684__attribute__((__noreturn__)) void rb_print_undef_str(VALUE, VALUE);
10685__attribute__((__noreturn__)) void rb_print_inaccessible(VALUE, ID, rb_method_visibility_t);
10686__attribute__((__noreturn__)) void rb_vm_localjump_error(const char *,VALUE, int);
10687__attribute__((__noreturn__)) void rb_vm_jump_tag_but_local_jump(int);
10688VALUE rb_vm_make_jump_tag_but_local_jump(int state, VALUE val);
10689rb_cref_t *rb_vm_cref(void);
10690rb_cref_t *rb_vm_cref_replace_with_duplicated_cref(void);
10691VALUE rb_vm_call_cfunc(VALUE recv, VALUE (*func)(VALUE), VALUE arg, VALUE block_handler, VALUE filename);
10692void rb_vm_set_progname(VALUE filename);
10693VALUE rb_vm_cbase(void);
10694VALUE rb_ec_backtrace_object(const rb_execution_context_t *ec);
10695VALUE rb_ec_backtrace_str_ary(const rb_execution_context_t *ec, long lev, long n);
10696VALUE rb_ec_backtrace_location_ary(const rb_execution_context_t *ec, long lev, long n, _Bool skip_internal);
10697static inline char *
10698rb_char_next(const char *p)
10699{
10700 if (p) {
10701 int len = mblen(p, 0x7fffffff);
10702 p += len > 0 ? len : 1;
10703 }
10704 return (char *)p;
10705}
10706const char *rb_obj_info(VALUE obj);
10707const char *rb_raw_obj_info(char *buff, const int buff_size, VALUE obj);
10708VALUE rb_gc_disable_no_rest(void);
10709struct rb_thread_struct;
10710
10711
10712size_t rb_objspace_data_type_memsize(VALUE obj);
10713void rb_objspace_reachable_objects_from(VALUE obj, void (func)(VALUE, void *), void *data);
10714void rb_objspace_reachable_objects_from_root(void (func)(const char *category, VALUE, void *), void *data);
10715int rb_objspace_markable_object_p(VALUE obj);
10716int rb_objspace_internal_object_p(VALUE obj);
10717int rb_objspace_marked_object_p(VALUE obj);
10718void rb_objspace_each_objects(
10719 int (*callback)(void *start, void *end, size_t stride, void *data),
10720 void *data);
10721void rb_objspace_each_objects_without_setup(
10722 int (*callback)(void *, void *, size_t, void *),
10723 void *data);
10724size_t rb_gc_obj_slot_size(VALUE obj);
10725
10726
10727struct rb_iseq_struct;
10728int rb_dvar_defined(ID, const struct rb_iseq_struct *);
10729int rb_local_defined(ID, const struct rb_iseq_struct *);
10730const char *rb_insns_name(int i);
10731VALUE rb_insns_name_array(void);
10732int rb_iseq_cdhash_cmp(VALUE val, VALUE lit);
10733st_index_t rb_iseq_cdhash_hash(VALUE a);
10734int rb_vm_insn_addr2insn(const void *);
10735int rb_vm_insn_decode(const VALUE encoded);
10736extern _Bool ruby_vm_keep_script_lines;
10737
10738
10739rb_event_flag_t rb_iseq_event_flags(const struct rb_iseq_struct *iseq, size_t pos);
10740
10741
10742struct rb_thread_struct;
10743struct rb_fiber_struct;
10744void rb_fiber_reset_root_local_storage(struct rb_thread_struct *);
10745void ruby_register_rollback_func_for_ensure(VALUE (*ensure_func)(VALUE), VALUE (*rollback_func)(VALUE));
10746void rb_fiber_init_mjit_cont(struct rb_fiber_struct *fiber);
10747VALUE rb_fiberptr_self(struct rb_fiber_struct *fiber);
10748unsigned int rb_fiberptr_blocking(struct rb_fiber_struct *fiber);
10749
10750
10751enum ruby_coderange_type {
10752 RUBY_ENC_CODERANGE_UNKNOWN = 0,
10753 RUBY_ENC_CODERANGE_7BIT = ((int)RUBY_FL_USER8),
10754 RUBY_ENC_CODERANGE_VALID = ((int)RUBY_FL_USER9),
10755 RUBY_ENC_CODERANGE_BROKEN = ((int)(RUBY_FL_USER8|RUBY_FL_USER9)),
10756 RUBY_ENC_CODERANGE_MASK = (RUBY_ENC_CODERANGE_7BIT|
10757 RUBY_ENC_CODERANGE_VALID|
10758 RUBY_ENC_CODERANGE_BROKEN)
10759};
10760__attribute__((__const__))
10761static inline int
10762rb_enc_coderange_clean_p(int cr)
10763{
10764 return (cr ^ (cr >> 1)) & RUBY_ENC_CODERANGE_7BIT;
10765}
10766__attribute__((__const__))
10767static inline _Bool
10768RB_ENC_CODERANGE_CLEAN_P(enum ruby_coderange_type cr)
10769{
10770 return rb_enc_coderange_clean_p(cr);
10771}
10772__attribute__((__pure__))
10773static inline enum ruby_coderange_type
10774RB_ENC_CODERANGE(VALUE obj)
10775{
10776 VALUE ret = RB_FL_TEST_RAW(obj, RUBY_ENC_CODERANGE_MASK);
10777 return ((enum ruby_coderange_type)ret);
10778}
10779__attribute__((__pure__))
10780static inline _Bool
10781RB_ENC_CODERANGE_ASCIIONLY(VALUE obj)
10782{
10783 return RB_ENC_CODERANGE(obj) == RUBY_ENC_CODERANGE_7BIT;
10784}
10785static inline void
10786RB_ENC_CODERANGE_SET(VALUE obj, enum ruby_coderange_type cr)
10787{
10788 RB_FL_UNSET_RAW(obj, RUBY_ENC_CODERANGE_MASK);
10789 RB_FL_SET_RAW(obj, cr);
10790}
10791static inline void
10792RB_ENC_CODERANGE_CLEAR(VALUE obj)
10793{
10794 RB_FL_UNSET_RAW(obj, RUBY_ENC_CODERANGE_MASK);
10795}
10796__attribute__((__const__))
10797static inline enum ruby_coderange_type
10798RB_ENC_CODERANGE_AND(enum ruby_coderange_type a, enum ruby_coderange_type b)
10799{
10800 if (a == RUBY_ENC_CODERANGE_7BIT) {
10801 return b;
10802 }
10803 else if (a != RUBY_ENC_CODERANGE_VALID) {
10804 return RUBY_ENC_CODERANGE_UNKNOWN;
10805 }
10806 else if (b == RUBY_ENC_CODERANGE_7BIT) {
10807 return RUBY_ENC_CODERANGE_VALID;
10808 }
10809 else {
10810 return b;
10811 }
10812}
10813
10814
10815
10816
10817typedef unsigned char OnigUChar;
10818typedef unsigned int OnigCodePoint;
10819typedef unsigned int OnigCtype;
10820typedef size_t OnigDistance;
10821typedef ptrdiff_t OnigPosition;
10822typedef unsigned int OnigCaseFoldType;
10823extern OnigCaseFoldType OnigDefaultCaseFoldFlag;
10824typedef struct {
10825 int byte_len;
10826 int code_len;
10827 OnigCodePoint code[3];
10828} OnigCaseFoldCodeItem;
10829typedef struct {
10830 OnigCodePoint esc;
10831 OnigCodePoint anychar;
10832 OnigCodePoint anytime;
10833 OnigCodePoint zero_or_one_time;
10834 OnigCodePoint one_or_more_time;
10835 OnigCodePoint anychar_anytime;
10836} OnigMetaCharTableType;
10837typedef int (*OnigApplyAllCaseFoldFunc)(OnigCodePoint from, OnigCodePoint* to, int to_len, void* arg);
10838typedef struct OnigEncodingTypeST {
10839 int (*precise_mbc_enc_len)(const OnigUChar* p,const OnigUChar* e, const struct OnigEncodingTypeST* enc);
10840 const char* name;
10841 int max_enc_len;
10842 int min_enc_len;
10843 int (*is_mbc_newline)(const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc);
10844 OnigCodePoint (*mbc_to_code)(const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc);
10845 int (*code_to_mbclen)(OnigCodePoint code, const struct OnigEncodingTypeST* enc);
10846 int (*code_to_mbc)(OnigCodePoint code, OnigUChar *buf, const struct OnigEncodingTypeST* enc);
10847 int (*mbc_case_fold)(OnigCaseFoldType flag, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, const struct OnigEncodingTypeST* enc);
10848 int (*apply_all_case_fold)(OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg, const struct OnigEncodingTypeST* enc);
10849 int (*get_case_fold_codes_by_str)(OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem acs[], const struct OnigEncodingTypeST* enc);
10850 int (*property_name_to_ctype)(const struct OnigEncodingTypeST* enc, const OnigUChar* p, const OnigUChar* end);
10851 int (*is_code_ctype)(OnigCodePoint code, OnigCtype ctype, const struct OnigEncodingTypeST* enc);
10852 int (*get_ctype_code_range)(OnigCtype ctype, OnigCodePoint* sb_out, const OnigCodePoint* ranges[], const struct OnigEncodingTypeST* enc);
10853 OnigUChar* (*left_adjust_char_head)(const OnigUChar* start, const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc);
10854 int (*is_allowed_reverse_match)(const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc);
10855 int (*case_map)(OnigCaseFoldType* flagP, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, OnigUChar* to_end, const struct OnigEncodingTypeST* enc);
10856 int ruby_encoding_index;
10857 unsigned int flags;
10858} OnigEncodingType;
10859typedef const OnigEncodingType* OnigEncoding;
10860extern const OnigEncodingType OnigEncodingASCII;
10861extern
10862int onigenc_ascii_only_case_map(OnigCaseFoldType* flagP, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, OnigUChar* to_end, const struct OnigEncodingTypeST* enc);
10863extern
10864int onigenc_mbclen_approximate(const OnigUChar* p,const OnigUChar* e, const struct OnigEncodingTypeST* enc);
10865extern
10866OnigUChar* onigenc_step_back(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end, int n);
10867extern
10868int onigenc_init(void);
10869extern
10870int onigenc_set_default_encoding(OnigEncoding enc);
10871extern
10872OnigEncoding onigenc_get_default_encoding(void);
10873extern
10874OnigUChar* onigenc_get_right_adjust_char_head_with_prev(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end, const OnigUChar** prev);
10875extern
10876OnigUChar* onigenc_get_prev_char_head(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end);
10877extern
10878OnigUChar* onigenc_get_left_adjust_char_head(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end);
10879extern
10880OnigUChar* onigenc_get_right_adjust_char_head(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end);
10881extern
10882int onigenc_strlen(OnigEncoding enc, const OnigUChar* p, const OnigUChar* end);
10883extern
10884int onigenc_strlen_null(OnigEncoding enc, const OnigUChar* p);
10885extern
10886int onigenc_str_bytelen_null(OnigEncoding enc, const OnigUChar* p);
10887typedef unsigned int OnigOptionType;
10888typedef struct {
10889 unsigned int op;
10890 unsigned int op2;
10891 unsigned int behavior;
10892 OnigOptionType options;
10893 OnigMetaCharTableType meta_char_table;
10894} OnigSyntaxType;
10895extern const OnigSyntaxType OnigSyntaxASIS;
10896extern const OnigSyntaxType OnigSyntaxPosixBasic;
10897extern const OnigSyntaxType OnigSyntaxPosixExtended;
10898extern const OnigSyntaxType OnigSyntaxEmacs;
10899extern const OnigSyntaxType OnigSyntaxGrep;
10900extern const OnigSyntaxType OnigSyntaxGnuRegex;
10901extern const OnigSyntaxType OnigSyntaxJava;
10902extern const OnigSyntaxType OnigSyntaxPerl58;
10903extern const OnigSyntaxType OnigSyntaxPerl58_NG;
10904extern const OnigSyntaxType OnigSyntaxPerl;
10905extern const OnigSyntaxType OnigSyntaxRuby;
10906extern const OnigSyntaxType OnigSyntaxPython;
10907extern const OnigSyntaxType* OnigDefaultSyntax;
10908struct re_registers {
10909 int allocated;
10910 int num_regs;
10911 OnigPosition* beg;
10912 OnigPosition* end;
10913};
10914typedef struct re_registers OnigRegion;
10915typedef struct {
10916 OnigEncoding enc;
10917 OnigUChar* par;
10918 OnigUChar* par_end;
10919} OnigErrorInfo;
10920typedef struct {
10921 int lower;
10922 int upper;
10923} OnigRepeatRange;
10924typedef void (*OnigWarnFunc)(const char* s);
10925extern void onig_null_warn(const char* s);
10926typedef struct re_pattern_buffer {
10927 unsigned char* p;
10928 unsigned int used;
10929 unsigned int alloc;
10930 int num_mem;
10931 int num_repeat;
10932 int num_null_check;
10933 int num_comb_exp_check;
10934 int num_call;
10935 unsigned int capture_history;
10936 unsigned int bt_mem_start;
10937 unsigned int bt_mem_end;
10938 int stack_pop_level;
10939 int repeat_range_alloc;
10940 OnigOptionType options;
10941 OnigRepeatRange* repeat_range;
10942 OnigEncoding enc;
10943 const OnigSyntaxType* syntax;
10944 void* name_table;
10945 OnigCaseFoldType case_fold_flag;
10946 int optimize;
10947 int threshold_len;
10948 int anchor;
10949 OnigDistance anchor_dmin;
10950 OnigDistance anchor_dmax;
10951 int sub_anchor;
10952 unsigned char *exact;
10953 unsigned char *exact_end;
10954 unsigned char map[256];
10955 int *int_map;
10956 int *int_map_backward;
10957 OnigDistance dmin;
10958 OnigDistance dmax;
10959 uint64_t timelimit;
10960 struct re_pattern_buffer* chain;
10961} OnigRegexType;
10962typedef OnigRegexType* OnigRegex;
10963typedef OnigRegexType regex_t;
10964typedef struct {
10965 int num_of_elements;
10966 OnigEncoding pattern_enc;
10967 OnigEncoding target_enc;
10968 const OnigSyntaxType* syntax;
10969 OnigOptionType option;
10970 OnigCaseFoldType case_fold_flag;
10971} OnigCompileInfo;
10972extern
10973int onig_initialize(OnigEncoding encodings[], int n);
10974extern
10975int onig_init(void);
10976extern
10977int onig_error_code_to_str(OnigUChar* s, OnigPosition err_code, ...);
10978extern
10979void onig_set_warn_func(OnigWarnFunc f);
10980extern
10981void onig_set_verb_warn_func(OnigWarnFunc f);
10982extern
10983int onig_new(OnigRegex*, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigOptionType option, OnigEncoding enc, const OnigSyntaxType* syntax, OnigErrorInfo* einfo);
10984extern
10985int onig_reg_init(OnigRegex reg, OnigOptionType option, OnigCaseFoldType case_fold_flag, OnigEncoding enc, const OnigSyntaxType* syntax);
10986extern
10987int onig_new_without_alloc(OnigRegex, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigOptionType option, OnigEncoding enc, const OnigSyntaxType* syntax, OnigErrorInfo* einfo);
10988extern
10989int onig_new_deluxe(OnigRegex* reg, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigCompileInfo* ci, OnigErrorInfo* einfo);
10990extern
10991void onig_free(OnigRegex);
10992extern
10993void onig_free_body(OnigRegex);
10994extern
10995OnigPosition onig_scan(OnigRegex reg, const OnigUChar* str, const OnigUChar* end, OnigRegion* region, OnigOptionType option, int (*scan_callback)(OnigPosition, OnigPosition, OnigRegion*, void*), void* callback_arg);
10996extern
10997OnigPosition onig_search(OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* start, const OnigUChar* range, OnigRegion* region, OnigOptionType option);
10998extern
10999OnigPosition onig_search_gpos(OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* global_pos, const OnigUChar* start, const OnigUChar* range, OnigRegion* region, OnigOptionType option);
11000extern
11001OnigPosition onig_match(OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* at, OnigRegion* region, OnigOptionType option);
11002extern
11003OnigRegion* onig_region_new(void);
11004extern
11005void onig_region_init(OnigRegion* region);
11006extern
11007void onig_region_free(OnigRegion* region, int free_self);
11008extern
11009void onig_region_copy(OnigRegion* to, const OnigRegion* from);
11010extern
11011void onig_region_clear(OnigRegion* region);
11012extern
11013int onig_region_resize(OnigRegion* region, int n);
11014extern
11015int onig_region_set(OnigRegion* region, int at, int beg, int end);
11016extern
11017int onig_name_to_group_numbers(OnigRegex reg, const OnigUChar* name, const OnigUChar* name_end, int** nums);
11018extern
11019int onig_name_to_backref_number(OnigRegex reg, const OnigUChar* name, const OnigUChar* name_end, const OnigRegion *region);
11020extern
11021int onig_foreach_name(OnigRegex reg, int (*func)(const OnigUChar*, const OnigUChar*,int,int*,OnigRegex,void*), void* arg);
11022extern
11023int onig_number_of_names(const OnigRegexType *reg);
11024extern
11025int onig_number_of_captures(const OnigRegexType *reg);
11026extern
11027int onig_number_of_capture_histories(const OnigRegexType *reg);
11028extern
11029int onig_capture_tree_traverse(OnigRegion* region, int at, int(*callback_func)(int,OnigPosition,OnigPosition,int,int,void*), void* arg);
11030extern
11031int onig_noname_group_capture_is_active(const OnigRegexType *reg);
11032extern
11033OnigEncoding onig_get_encoding(const OnigRegexType *reg);
11034extern
11035OnigOptionType onig_get_options(const OnigRegexType *reg);
11036extern
11037OnigCaseFoldType onig_get_case_fold_flag(const OnigRegexType *reg);
11038extern
11039const OnigSyntaxType* onig_get_syntax(const OnigRegexType *reg);
11040extern
11041int onig_set_default_syntax(const OnigSyntaxType* syntax);
11042extern
11043void onig_copy_syntax(OnigSyntaxType* to, const OnigSyntaxType* from);
11044extern
11045unsigned int onig_get_syntax_op(const OnigSyntaxType* syntax);
11046extern
11047unsigned int onig_get_syntax_op2(const OnigSyntaxType* syntax);
11048extern
11049unsigned int onig_get_syntax_behavior(const OnigSyntaxType* syntax);
11050extern
11051OnigOptionType onig_get_syntax_options(const OnigSyntaxType* syntax);
11052extern
11053void onig_set_syntax_op(OnigSyntaxType* syntax, unsigned int op);
11054extern
11055void onig_set_syntax_op2(OnigSyntaxType* syntax, unsigned int op2);
11056extern
11057void onig_set_syntax_behavior(OnigSyntaxType* syntax, unsigned int behavior);
11058extern
11059void onig_set_syntax_options(OnigSyntaxType* syntax, OnigOptionType options);
11060extern
11061int onig_set_meta_char(OnigSyntaxType* syntax, unsigned int what, OnigCodePoint code);
11062extern
11063void onig_copy_encoding(OnigEncodingType *to, OnigEncoding from);
11064extern
11065OnigCaseFoldType onig_get_default_case_fold_flag(void);
11066extern
11067int onig_set_default_case_fold_flag(OnigCaseFoldType case_fold_flag);
11068extern
11069unsigned int onig_get_match_stack_limit_size(void);
11070extern
11071int onig_set_match_stack_limit_size(unsigned int size);
11072extern
11073unsigned int onig_get_parse_depth_limit(void);
11074extern
11075int onig_set_parse_depth_limit(unsigned int depth);
11076extern
11077int onig_end(void);
11078extern
11079const char* onig_version(void);
11080extern
11081const char* onig_copyright(void);
11082
11083
11084
11085
11086extern VALUE rb_cEncoding;
11087enum ruby_encoding_consts {
11088 RUBY_ENCODING_INLINE_MAX = 127,
11089 RUBY_ENCODING_SHIFT = (RUBY_FL_USHIFT+10),
11090 RUBY_ENCODING_MASK = (RUBY_ENCODING_INLINE_MAX<<RUBY_ENCODING_SHIFT
11091 ),
11092 RUBY_ENCODING_MAXNAMELEN = 42
11093};
11094static inline void
11095RB_ENCODING_SET_INLINED(VALUE obj, int encindex)
11096{
11097 VALUE f = encindex;
11098 f <<= RUBY_ENCODING_SHIFT;
11099 RB_FL_UNSET_RAW(obj, RUBY_ENCODING_MASK);
11100 RB_FL_SET_RAW(obj, f);
11101}
11102static inline int
11103RB_ENCODING_GET_INLINED(VALUE obj)
11104{
11105 VALUE ret = RB_FL_TEST_RAW(obj, RUBY_ENCODING_MASK) >> RUBY_ENCODING_SHIFT;
11106 return ((int)ret);
11107}
11108typedef const OnigEncodingType rb_encoding;
11109
11110int rb_char_to_option_kcode(int c, int *option, int *kcode);
11111int rb_enc_replicate(const char *name, rb_encoding *src);
11112int rb_define_dummy_encoding(const char *name);
11113__attribute__((__pure__))
11114int rb_enc_dummy_p(rb_encoding *enc);
11115__attribute__((__pure__))
11116int rb_enc_to_index(rb_encoding *enc);
11117int rb_enc_get_index(VALUE obj);
11118static inline int
11119RB_ENCODING_GET(VALUE obj)
11120{
11121 int encindex = RB_ENCODING_GET_INLINED(obj);
11122 if (encindex == RUBY_ENCODING_INLINE_MAX) {
11123 return rb_enc_get_index(obj);
11124 }
11125 else {
11126 return encindex;
11127 }
11128}
11129void rb_enc_set_index(VALUE obj, int encindex);
11130static inline void
11131RB_ENCODING_SET(VALUE obj, int encindex)
11132{
11133 rb_enc_set_index(obj, encindex);
11134}
11135static inline void
11136RB_ENCODING_CODERANGE_SET(VALUE obj, int encindex, enum ruby_coderange_type cr)
11137{
11138 RB_ENCODING_SET(obj, encindex);
11139 RB_ENC_CODERANGE_SET(obj, cr);
11140}
11141__attribute__((__pure__))
11142int rb_enc_capable(VALUE obj);
11143int rb_enc_find_index(const char *name);
11144int rb_enc_alias(const char *alias, const char *orig);
11145int rb_to_encoding_index(VALUE obj);
11146rb_encoding *rb_to_encoding(VALUE obj);
11147rb_encoding *rb_find_encoding(VALUE obj);
11148rb_encoding *rb_enc_get(VALUE obj);
11149rb_encoding *rb_enc_compatible(VALUE str1, VALUE str2);
11150rb_encoding *rb_enc_check(VALUE str1,VALUE str2);
11151VALUE rb_enc_associate_index(VALUE obj, int encindex);
11152VALUE rb_enc_associate(VALUE obj, rb_encoding *enc);
11153void rb_enc_copy(VALUE dst, VALUE src);
11154rb_encoding *rb_enc_from_index(int idx);
11155rb_encoding *rb_enc_find(const char *name);
11156static inline const char *
11157rb_enc_name(rb_encoding *enc)
11158{
11159 return enc->name;
11160}
11161static inline int
11162rb_enc_mbminlen(rb_encoding *enc)
11163{
11164 return enc->min_enc_len;
11165}
11166static inline int
11167rb_enc_mbmaxlen(rb_encoding *enc)
11168{
11169 return enc->max_enc_len;
11170}
11171int rb_enc_mbclen(const char *p, const char *e, rb_encoding *enc);
11172int rb_enc_fast_mbclen(const char *p, const char *e, rb_encoding *enc);
11173int rb_enc_precise_mbclen(const char *p, const char *e, rb_encoding *enc);
11174int rb_enc_ascget(const char *p, const char *e, int *len, rb_encoding *enc);
11175unsigned int rb_enc_codepoint_len(const char *p, const char *e, int *len, rb_encoding *enc);
11176static inline unsigned int
11177rb_enc_codepoint(const char *p, const char *e, rb_encoding *enc)
11178{
11179 return rb_enc_codepoint_len(p, e, 0, enc);
11180}
11181static inline OnigCodePoint
11182rb_enc_mbc_to_codepoint(const char *p, const char *e, rb_encoding *enc)
11183{
11184 const OnigUChar *up = ((const OnigUChar *)p);
11185 const OnigUChar *ue = ((const OnigUChar *)e);
11186 return (enc)->mbc_to_code((up),(ue),enc);
11187}
11188int rb_enc_codelen(int code, rb_encoding *enc);
11189static inline int
11190rb_enc_code_to_mbclen(int c, rb_encoding *enc)
11191{
11192 OnigCodePoint uc = ((OnigCodePoint)c);
11193 return (enc)->code_to_mbclen(uc,enc);
11194}
11195static inline int
11196rb_enc_mbcput(unsigned int c, void *buf, rb_encoding *enc)
11197{
11198 OnigCodePoint uc = ((OnigCodePoint)c);
11199 OnigUChar *ubuf = ((OnigUChar *)buf);
11200 return (enc)->code_to_mbc(uc,ubuf,enc);
11201}
11202static inline char *
11203rb_enc_prev_char(const char *s, const char *p, const char *e, rb_encoding *enc)
11204{
11205 const OnigUChar *us = ((const OnigUChar *)s);
11206 const OnigUChar *up = ((const OnigUChar *)p);
11207 const OnigUChar *ue = ((const OnigUChar *)e);
11208 OnigUChar *ur = onigenc_get_prev_char_head(enc, us, up, ue);
11209 return ((char *)ur);
11210}
11211static inline char *
11212rb_enc_left_char_head(const char *s, const char *p, const char *e, rb_encoding *enc)
11213{
11214 const OnigUChar *us = ((const OnigUChar *)s);
11215 const OnigUChar *up = ((const OnigUChar *)p);
11216 const OnigUChar *ue = ((const OnigUChar *)e);
11217 OnigUChar *ur = onigenc_get_left_adjust_char_head(enc, us, up, ue);
11218 return ((char *)ur);
11219}
11220static inline char *
11221rb_enc_right_char_head(const char *s, const char *p, const char *e, rb_encoding *enc)
11222{
11223 const OnigUChar *us = ((const OnigUChar *)s);
11224 const OnigUChar *up = ((const OnigUChar *)p);
11225 const OnigUChar *ue = ((const OnigUChar *)e);
11226 OnigUChar *ur = onigenc_get_right_adjust_char_head(enc, us, up, ue);
11227 return ((char *)ur);
11228}
11229static inline char *
11230rb_enc_step_back(const char *s, const char *p, const char *e, int n, rb_encoding *enc)
11231{
11232 const OnigUChar *us = ((const OnigUChar *)s);
11233 const OnigUChar *up = ((const OnigUChar *)p);
11234 const OnigUChar *ue = ((const OnigUChar *)e);
11235 const OnigUChar *ur = onigenc_step_back(enc, us, up, ue, n);
11236 return ((char *)ur);
11237}
11238static inline int
11239rb_enc_asciicompat_inline(rb_encoding *enc)
11240{
11241 return rb_enc_mbminlen(enc)==1 && !rb_enc_dummy_p(enc);
11242}
11243static inline _Bool
11244rb_enc_asciicompat(rb_encoding *enc)
11245{
11246 if (rb_enc_mbminlen(enc) != 1) {
11247 return 0;
11248 }
11249 else if (rb_enc_dummy_p(enc)) {
11250 return 0;
11251 }
11252 else {
11253 return 1;
11254 }
11255}
11256static inline _Bool
11257rb_enc_str_asciicompat_p(VALUE str)
11258{
11259 rb_encoding *enc = rb_enc_get(str);
11260 return rb_enc_asciicompat(enc);
11261}
11262VALUE rb_enc_from_encoding(rb_encoding *enc);
11263__attribute__((__pure__))
11264int rb_enc_unicode_p(rb_encoding *enc);
11265__attribute__((__returns_nonnull__))
11266rb_encoding *rb_ascii8bit_encoding(void);
11267__attribute__((__returns_nonnull__))
11268rb_encoding *rb_utf8_encoding(void);
11269__attribute__((__returns_nonnull__))
11270rb_encoding *rb_usascii_encoding(void);
11271rb_encoding *rb_locale_encoding(void);
11272rb_encoding *rb_filesystem_encoding(void);
11273rb_encoding *rb_default_external_encoding(void);
11274rb_encoding *rb_default_internal_encoding(void);
11275__attribute__((__const__))
11276int rb_ascii8bit_encindex(void);
11277static inline _Bool
11278RB_ENCODING_IS_ASCII8BIT(VALUE obj)
11279{
11280 return RB_ENCODING_GET_INLINED(obj) == rb_ascii8bit_encindex();
11281}
11282__attribute__((__const__))
11283int rb_utf8_encindex(void);
11284__attribute__((__const__))
11285int rb_usascii_encindex(void);
11286int rb_locale_encindex(void);
11287int rb_filesystem_encindex(void);
11288VALUE rb_enc_default_external(void);
11289VALUE rb_enc_default_internal(void);
11290void rb_enc_set_default_external(VALUE encoding);
11291void rb_enc_set_default_internal(VALUE encoding);
11292VALUE rb_locale_charmap(VALUE klass);
11293
11294
11295
11296
11297static inline _Bool
11298rb_enc_is_newline(const char *p, const char *e, rb_encoding *enc)
11299{
11300 OnigUChar *up = ((OnigUChar *)p);
11301 OnigUChar *ue = ((OnigUChar *)e);
11302 return (enc)->is_mbc_newline((up),(ue),enc);
11303}
11304static inline _Bool
11305rb_enc_isctype(OnigCodePoint c, OnigCtype t, rb_encoding *enc)
11306{
11307 return (enc)->is_code_ctype(c,t,enc);
11308}
11309static inline _Bool
11310rb_enc_isascii(OnigCodePoint c, rb_encoding *enc)
11311{
11312 return ((c) < 128);
11313}
11314static inline _Bool
11315rb_enc_isalpha(OnigCodePoint c, rb_encoding *enc)
11316{
11317 return (enc)->is_code_ctype(c,1,enc);
11318}
11319static inline _Bool
11320rb_enc_islower(OnigCodePoint c, rb_encoding *enc)
11321{
11322 return (enc)->is_code_ctype(c,6,enc);
11323}
11324static inline _Bool
11325rb_enc_isupper(OnigCodePoint c, rb_encoding *enc)
11326{
11327 return (enc)->is_code_ctype(c,10,enc);
11328}
11329static inline _Bool
11330rb_enc_ispunct(OnigCodePoint c, rb_encoding *enc)
11331{
11332 return (enc)->is_code_ctype(c,8,enc);
11333}
11334static inline _Bool
11335rb_enc_isalnum(OnigCodePoint c, rb_encoding *enc)
11336{
11337 return (enc)->is_code_ctype(c,13,enc);
11338}
11339static inline _Bool
11340rb_enc_isprint(OnigCodePoint c, rb_encoding *enc)
11341{
11342 return (enc)->is_code_ctype(c,7,enc);
11343}
11344static inline _Bool
11345rb_enc_isspace(OnigCodePoint c, rb_encoding *enc)
11346{
11347 return (enc)->is_code_ctype(c,9,enc);
11348}
11349static inline _Bool
11350rb_enc_isdigit(OnigCodePoint c, rb_encoding *enc)
11351{
11352 return (enc)->is_code_ctype(c,4,enc);
11353}
11354__attribute__((__const__))
11355int rb_enc_toupper(int c, rb_encoding *enc);
11356__attribute__((__const__))
11357int rb_enc_tolower(int c, rb_encoding *enc);
11358
11359
11360
11361
11362__attribute__((__nonnull__ ()))
11363char *rb_enc_path_next(const char *path, const char *end, rb_encoding *enc);
11364__attribute__((__nonnull__ ()))
11365char *rb_enc_path_skip_prefix(const char *path, const char *end, rb_encoding *enc);
11366__attribute__((__nonnull__ ()))
11367char *rb_enc_path_last_separator(const char *path, const char *end, rb_encoding *enc);
11368__attribute__((__nonnull__ ()))
11369char *rb_enc_path_end(const char *path, const char *end, rb_encoding *enc);
11370__attribute__((__nonnull__ (1, 4)))
11371const char *ruby_enc_find_basename(const char *name, long *baselen, long *alllen, rb_encoding *enc);
11372__attribute__((__nonnull__ (1, 3)))
11373const char *ruby_enc_find_extname(const char *name, long *len, rb_encoding *enc);
11374
11375
11376
11377
11378VALUE rb_enc_reg_new(const char *ptr, long len, rb_encoding *enc, int opts);
11379
11380
11381
11382
11383__attribute__((__nonnull__ (2)))
11384__attribute__((__format__(__printf__, 2, 3)))
11385VALUE rb_enc_sprintf(rb_encoding *enc, const char *fmt, ...);
11386__attribute__((__nonnull__ (2)))
11387__attribute__((__format__(__printf__, 2, 0)))
11388VALUE rb_enc_vsprintf(rb_encoding *enc, const char *fmt, va_list ap);
11389__attribute__((__noreturn__))
11390__attribute__((__nonnull__ (3)))
11391__attribute__((__format__(__printf__, 3, 4)))
11392void rb_enc_raise(rb_encoding *enc, VALUE exc, const char *fmt, ...);
11393
11394
11395
11396
11397VALUE rb_enc_str_new(const char *ptr, long len, rb_encoding *enc);
11398__attribute__((__nonnull__ (1)))
11399VALUE rb_enc_str_new_cstr(const char *ptr, rb_encoding *enc);
11400VALUE rb_enc_str_new_static(const char *ptr, long len, rb_encoding *enc);
11401VALUE rb_enc_interned_str(const char *ptr, long len, rb_encoding *enc);
11402__attribute__((__nonnull__ (1)))
11403VALUE rb_enc_interned_str_cstr(const char *ptr, rb_encoding *enc);
11404long rb_enc_strlen(const char *head, const char *tail, rb_encoding *enc);
11405char *rb_enc_nth(const char *head, const char *tail, long nth, rb_encoding *enc);
11406VALUE rb_obj_encoding(VALUE obj);
11407VALUE rb_enc_str_buf_cat(VALUE str, const char *ptr, long len, rb_encoding *enc);
11408VALUE rb_enc_uint_chr(unsigned int code, rb_encoding *enc);
11409VALUE rb_external_str_new_with_enc(const char *ptr, long len, rb_encoding *enc);
11410VALUE rb_str_export_to_enc(VALUE obj, rb_encoding *enc);
11411VALUE rb_str_conv_enc(VALUE str, rb_encoding *from, rb_encoding *to);
11412VALUE rb_str_conv_enc_opts(VALUE str, rb_encoding *from, rb_encoding *to, int ecflags, VALUE ecopts);
11413int rb_enc_str_coderange(VALUE str);
11414long rb_str_coderange_scan_restartable(const char *str, const char *end, rb_encoding *enc, int *cr);
11415int rb_enc_str_asciionly_p(VALUE str);
11416__attribute__((__nonnull__ ()))
11417long rb_memsearch(const void *x, long m, const void *y, long n, rb_encoding *enc);
11418__attribute__((__nonnull__ ()))
11419static inline VALUE
11420rbimpl_enc_str_new_cstr(const char *str, rb_encoding *enc)
11421{
11422 long len = rbimpl_strlen(str);
11423 return rb_enc_str_new_static(str, len, enc);
11424}
11425
11426
11427
11428
11429ID rb_intern3(const char *name, long len, rb_encoding *enc);
11430__attribute__((__nonnull__ ()))
11431int rb_enc_symname_p(const char *str, rb_encoding *enc);
11432int rb_enc_symname2_p(const char *name, long len, rb_encoding *enc);
11433ID rb_check_id_cstr(const char *ptr, long len, rb_encoding *enc);
11434VALUE rb_check_symbol_cstr(const char *ptr, long len, rb_encoding *enc);
11435
11436
11437
11438
11439typedef enum {
11440 econv_invalid_byte_sequence,
11441 econv_undefined_conversion,
11442 econv_destination_buffer_full,
11443 econv_source_buffer_empty,
11444 econv_finished,
11445 econv_after_output,
11446 econv_incomplete_input
11447} rb_econv_result_t;
11448typedef struct rb_econv_t rb_econv_t;
11449VALUE rb_str_encode(VALUE str, VALUE to, int ecflags, VALUE ecopts);
11450int rb_econv_has_convpath_p(const char* from_encoding, const char* to_encoding);
11451int rb_econv_prepare_options(VALUE opthash, VALUE *ecopts, int ecflags);
11452int rb_econv_prepare_opts(VALUE opthash, VALUE *ecopts);
11453rb_econv_t *rb_econv_open(const char *source_encoding, const char *destination_encoding, int ecflags);
11454rb_econv_t *rb_econv_open_opts(const char *source_encoding, const char *destination_encoding, int ecflags, VALUE ecopts);
11455rb_econv_result_t rb_econv_convert(rb_econv_t *ec,
11456 const unsigned char **source_buffer_ptr, const unsigned char *source_buffer_end,
11457 unsigned char **destination_buffer_ptr, unsigned char *destination_buffer_end,
11458 int flags);
11459void rb_econv_close(rb_econv_t *ec);
11460int rb_econv_set_replacement(rb_econv_t *ec, const unsigned char *str, size_t len, const char *encname);
11461int rb_econv_decorate_at_first(rb_econv_t *ec, const char *decorator_name);
11462int rb_econv_decorate_at_last(rb_econv_t *ec, const char *decorator_name);
11463VALUE rb_econv_open_exc(const char *senc, const char *denc, int ecflags);
11464int rb_econv_insert_output(rb_econv_t *ec,
11465 const unsigned char *str, size_t len, const char *str_encoding);
11466const char *rb_econv_encoding_to_insert_output(rb_econv_t *ec);
11467void rb_econv_check_error(rb_econv_t *ec);
11468VALUE rb_econv_make_exception(rb_econv_t *ec);
11469int rb_econv_putbackable(rb_econv_t *ec);
11470void rb_econv_putback(rb_econv_t *ec, unsigned char *p, int n);
11471const char *rb_econv_asciicompat_encoding(const char *encname);
11472VALUE rb_econv_str_convert(rb_econv_t *ec, VALUE src, int flags);
11473VALUE rb_econv_substr_convert(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, int flags);
11474VALUE rb_econv_str_append(rb_econv_t *ec, VALUE src, VALUE dst, int flags);
11475VALUE rb_econv_substr_append(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, VALUE dst, int flags);
11476VALUE rb_econv_append(rb_econv_t *ec, const char *bytesrc, long bytesize, VALUE dst, int flags);
11477void rb_econv_binmode(rb_econv_t *ec);
11478enum ruby_econv_flag_type {
11479 RUBY_ECONV_ERROR_HANDLER_MASK = 0x000000ff,
11480 RUBY_ECONV_INVALID_MASK = 0x0000000f,
11481 RUBY_ECONV_INVALID_REPLACE = 0x00000002,
11482 RUBY_ECONV_UNDEF_MASK = 0x000000f0,
11483 RUBY_ECONV_UNDEF_REPLACE = 0x00000020,
11484 RUBY_ECONV_UNDEF_HEX_CHARREF = 0x00000030,
11485 RUBY_ECONV_DECORATOR_MASK = 0x0000ff00,
11486 RUBY_ECONV_NEWLINE_DECORATOR_MASK = 0x00003f00,
11487 RUBY_ECONV_NEWLINE_DECORATOR_READ_MASK = 0x00000f00,
11488 RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK = 0x00003000,
11489 RUBY_ECONV_UNIVERSAL_NEWLINE_DECORATOR = 0x00000100,
11490 RUBY_ECONV_CRLF_NEWLINE_DECORATOR = 0x00001000,
11491 RUBY_ECONV_CR_NEWLINE_DECORATOR = 0x00002000,
11492 RUBY_ECONV_XML_TEXT_DECORATOR = 0x00004000,
11493 RUBY_ECONV_XML_ATTR_CONTENT_DECORATOR = 0x00008000,
11494 RUBY_ECONV_STATEFUL_DECORATOR_MASK = 0x00f00000,
11495 RUBY_ECONV_XML_ATTR_QUOTE_DECORATOR = 0x00100000,
11496 RUBY_ECONV_DEFAULT_NEWLINE_DECORATOR =
11497 0,
11498 RUBY_ECONV_PARTIAL_INPUT = 0x00010000,
11499 RUBY_ECONV_AFTER_OUTPUT = 0x00020000,
11500 RUBY_ECONV_FLAGS_PLACEHOLDER
11501};
11502
11503
11504VALUE rb_fstring(VALUE);
11505VALUE rb_fstring_cstr(const char *str);
11506VALUE rb_fstring_enc_new(const char *ptr, long len, rb_encoding *enc);
11507int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p);
11508int rb_str_symname_p(VALUE);
11509VALUE rb_str_quote_unprintable(VALUE);
11510char *rb_str_fill_terminator(VALUE str, const int termlen);
11511void rb_str_change_terminator_length(VALUE str, const int oldtermlen, const int termlen);
11512VALUE rb_str_locktmp_ensure(VALUE str, VALUE (*func)(VALUE), VALUE arg);
11513VALUE rb_str_chomp_string(VALUE str, VALUE chomp);
11514VALUE rb_external_str_with_enc(VALUE str, rb_encoding *eenc);
11515VALUE rb_str_cat_conv_enc_opts(VALUE newstr, long ofs, const char *ptr, long len,
11516 rb_encoding *from, int ecflags, VALUE ecopts);
11517VALUE rb_enc_str_scrub(rb_encoding *enc, VALUE str, VALUE repl);
11518VALUE rb_str_escape(VALUE str);
11519size_t rb_str_memsize(VALUE);
11520char *rb_str_to_cstr(VALUE str);
11521const char *ruby_escaped_char(int c);
11522void rb_str_make_independent(VALUE str);
11523int rb_enc_str_coderange_scan(VALUE str, rb_encoding *enc);
11524static inline _Bool STR_EMBED_P(VALUE str);
11525static inline _Bool STR_SHARED_P(VALUE str);
11526static inline VALUE QUOTE(VALUE v);
11527static inline VALUE QUOTE_ID(ID v);
11528static inline _Bool is_ascii_string(VALUE str);
11529static inline _Bool is_broken_string(VALUE str);
11530static inline VALUE rb_str_eql_internal(const VALUE str1, const VALUE str2);
11531
11532
11533VALUE rb_str_tmp_frozen_acquire(VALUE str);
11534void rb_str_tmp_frozen_release(VALUE str, VALUE tmp);
11535VALUE rb_setup_fake_str(struct RString *fake_str, const char *name, long len, rb_encoding *enc);
11536VALUE rb_str_upto_each(VALUE, VALUE, int, int (*each)(VALUE, VALUE), VALUE);
11537VALUE rb_str_upto_endless_each(VALUE, int (*each)(VALUE, VALUE), VALUE);
11538
11539
11540
11541
11542VALUE rb_fstring_new(const char *ptr, long len);
11543VALUE rb_obj_as_string_result(VALUE str, VALUE obj);
11544VALUE rb_str_opt_plus(VALUE x, VALUE y);
11545VALUE rb_str_concat_literals(size_t num, const VALUE *strary);
11546VALUE rb_str_eql(VALUE str1, VALUE str2);
11547VALUE rb_id_quote_unprintable(ID);
11548VALUE rb_sym_proc_call(ID mid, int argc, const VALUE *argv, int kw_splat, VALUE passed_proc);
11549struct rb_execution_context_struct;
11550VALUE rb_ec_str_resurrect(struct rb_execution_context_struct *ec, VALUE str);
11551
11552
11553static inline VALUE
11554QUOTE(VALUE v)
11555{
11556 return rb_str_quote_unprintable(v);
11557}
11558static inline VALUE
11559QUOTE_ID(ID i)
11560{
11561 return rb_id_quote_unprintable(i);
11562}
11563static inline _Bool
11564STR_EMBED_P(VALUE str)
11565{
11566 return ! RB_FL_TEST_RAW(str, ((VALUE)RUBY_FL_USER1));
11567}
11568static inline _Bool
11569STR_SHARED_P(VALUE str)
11570{
11571 return RB_FL_ALL_RAW(str, ((VALUE)RUBY_FL_USER1) | RUBY_ELTS_SHARED);
11572}
11573static inline _Bool
11574is_ascii_string(VALUE str)
11575{
11576 return rb_enc_str_coderange(str) == RUBY_ENC_CODERANGE_7BIT;
11577}
11578static inline _Bool
11579is_broken_string(VALUE str)
11580{
11581 return rb_enc_str_coderange(str) == RUBY_ENC_CODERANGE_BROKEN;
11582}
11583static inline VALUE
11584rb_str_eql_internal(const VALUE str1, const VALUE str2)
11585{
11586 const long len = RSTRING_LEN(str1);
11587 const char *ptr1, *ptr2;
11588 if (len != RSTRING_LEN(str2)) return ((VALUE)RUBY_Qfalse);
11589 if (!rb_str_comparable(str1, str2)) return ((VALUE)RUBY_Qfalse);
11590 if ((ptr1 = RSTRING_PTR(str1)) == (ptr2 = RSTRING_PTR(str2)))
11591 return ((VALUE)RUBY_Qtrue);
11592 if (memcmp(ptr1, ptr2, len) == 0)
11593 return ((VALUE)RUBY_Qtrue);
11594 return ((VALUE)RUBY_Qfalse);
11595}
11596extern long rb_backtrace_length_limit;
11597extern VALUE rb_eEAGAIN;
11598extern VALUE rb_eEWOULDBLOCK;
11599extern VALUE rb_eEINPROGRESS;
11600__attribute__((__format__(__printf__, 3, 0)))
11601void rb_report_bug_valist(VALUE file, int line, const char *fmt, va_list args);
11602__attribute__((__noreturn__)) void rb_async_bug_errno(const char *,int);
11603const char *rb_builtin_type_name(int t);
11604const char *rb_builtin_class_name(VALUE x);
11605__attribute__((__format__(__printf__, (1), (3)))) void rb_warn_deprecated(const char *fmt, const char *suggest, ...);
11606__attribute__((__format__(__printf__, (2), (4)))) void rb_warn_deprecated_to_remove(const char *removal, const char *fmt, const char *suggest, ...);
11607__attribute__((__format__(__printf__, 6, 0)))
11608VALUE rb_syntax_error_append(VALUE, VALUE, int, int, rb_encoding*, const char*, va_list);
11609__attribute__((__format__(__printf__, (2), (3)))) void rb_enc_warn(rb_encoding *enc, const char *fmt, ...);
11610__attribute__((__format__(__printf__, (2), (3)))) void rb_sys_enc_warning(rb_encoding *enc, const char *fmt, ...);
11611__attribute__((__format__(__printf__, (3), (4)))) void rb_syserr_enc_warning(int err, rb_encoding *enc, const char *fmt, ...);
11612rb_warning_category_t rb_warning_category_from_name(VALUE category);
11613_Bool rb_warning_category_enabled_p(rb_warning_category_t category);
11614VALUE rb_name_err_new(VALUE mesg, VALUE recv, VALUE method);
11615VALUE rb_nomethod_err_new(VALUE mesg, VALUE recv, VALUE method, VALUE args, int priv);
11616VALUE rb_key_err_new(VALUE mesg, VALUE recv, VALUE name);
11617__attribute__((__format__(__printf__, (1), (2)))) VALUE rb_warning_string(const char *fmt, ...);
11618__attribute__((__format__(__printf__, 2, 0)))
11619__attribute__((__noreturn__)) void rb_vraise(VALUE, const char *, va_list);
11620__attribute__((__noreturn__)) static inline void rb_raise_cstr(VALUE etype, const char *mesg);
11621__attribute__((__noreturn__)) static inline void rb_raise_cstr_i(VALUE etype, VALUE mesg);
11622__attribute__((__noreturn__)) static inline void rb_name_err_raise_str(VALUE mesg, VALUE recv, VALUE name);
11623__attribute__((__noreturn__)) static inline void rb_name_err_raise(const char *mesg, VALUE recv, VALUE name);
11624__attribute__((__noreturn__)) static inline void rb_key_err_raise(VALUE mesg, VALUE recv, VALUE name);
11625static inline void Check_Type(VALUE v, enum ruby_value_type t);
11626static inline _Bool rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type);
11627
11628
11629int rb_bug_reporter_add(void (*func)(FILE *, void *), void *data);
11630__attribute__((__noreturn__)) void rb_sys_fail_path_in(const char *func_name, VALUE path);
11631__attribute__((__noreturn__)) void rb_syserr_fail_path_in(const char *func_name, int err, VALUE path);
11632VALUE rb_syserr_new_path_in(const char *func_name, int n, VALUE path);
11633
11634
11635static inline void
11636rb_raise_cstr_i(VALUE etype, VALUE mesg)
11637{
11638 VALUE exc = rb_exc_new_str(etype, mesg);
11639 rb_exc_raise(exc);
11640}
11641static inline void
11642rb_raise_cstr(VALUE etype, const char *mesg)
11643{
11644 VALUE str = ((__builtin_constant_p(mesg) ? rbimpl_str_new_cstr : rb_str_new_cstr) (mesg));
11645 rb_raise_cstr_i(etype, str);
11646}
11647static inline void
11648rb_name_err_raise_str(VALUE mesg, VALUE recv, VALUE name)
11649{
11650 VALUE exc = rb_name_err_new(mesg, recv, name);
11651 rb_exc_raise(exc);
11652}
11653static inline void
11654rb_name_err_raise(const char *mesg, VALUE recv, VALUE name)
11655{
11656 VALUE str = (__builtin_constant_p(mesg) ? rb_fstring_new((mesg), (long)strlen(mesg)) : (rb_fstring_cstr)(mesg));
11657 rb_name_err_raise_str(str, recv, name);
11658}
11659static inline void
11660rb_key_err_raise(VALUE mesg, VALUE recv, VALUE name)
11661{
11662 VALUE exc = rb_key_err_new(mesg, recv, name);
11663 rb_exc_raise(exc);
11664}
11665static inline _Bool
11666rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type)
11667{
11668 return RB_TYPE_P(obj, RUBY_T_DATA) && RTYPEDDATA_P(obj) && (RTYPEDDATA_TYPE(obj) == data_type);
11669}
11670extern ID ruby_static_id_signo;
11671extern ID ruby_static_id_status;
11672VALUE rb_refinement_module_get_refined_class(VALUE module);
11673void rb_class_modify_check(VALUE);
11674__attribute__((__noreturn__)) VALUE rb_f_raise(int argc, VALUE *argv);
11675VALUE rb_get_backtrace(VALUE info);
11676void rb_call_end_proc(VALUE data);
11677void rb_mark_end_proc(void);
11678void Init_class_hierarchy(void);
11679void Init_enc(void);
11680void Init_ext(void);
11681void Init_File(void);
11682void Init_heap(void);
11683int Init_enc_set_filesystem_encoding(void);
11684void Init_newline(void);
11685void Init_BareVM(void);
11686void Init_vm_objects(void);
11687void Init_vm_backtrace(void);
11688void Init_vm_eval(void);static inline
11689void Init_vm_stack_canary(void);
11690void Init_eval_method(void);
11691void rb_call_inits(void);
11692struct rb_id_table;
11693enum rb_id_table_iterator_result {
11694 ID_TABLE_CONTINUE = ST_CONTINUE,
11695 ID_TABLE_STOP = ST_STOP,
11696 ID_TABLE_DELETE = ST_DELETE,
11697 ID_TABLE_REPLACE = ST_REPLACE,
11698 ID_TABLE_ITERATOR_RESULT_END
11699};
11700struct rb_id_table *rb_id_table_create(size_t size);
11701void rb_id_table_free(struct rb_id_table *tbl);
11702void rb_id_table_clear(struct rb_id_table *tbl);
11703size_t rb_id_table_size(const struct rb_id_table *tbl);
11704size_t rb_id_table_memsize(const struct rb_id_table *tbl);
11705int rb_id_table_insert(struct rb_id_table *tbl, ID id, VALUE val);
11706int rb_id_table_lookup(struct rb_id_table *tbl, ID id, VALUE *valp);
11707int rb_id_table_delete(struct rb_id_table *tbl, ID id);
11708typedef enum rb_id_table_iterator_result rb_id_table_update_value_callback_func_t(VALUE *val, void *data, int existing);
11709typedef enum rb_id_table_iterator_result rb_id_table_foreach_func_t(ID id, VALUE val, void *data);
11710typedef enum rb_id_table_iterator_result rb_id_table_foreach_values_func_t(VALUE val, void *data);
11711void rb_id_table_foreach(struct rb_id_table *tbl, rb_id_table_foreach_func_t *func, void *data);
11712void rb_id_table_foreach_values(struct rb_id_table *tbl, rb_id_table_foreach_values_func_t *func, void *data);
11713void rb_id_table_foreach_values_with_replace(struct rb_id_table *tbl, rb_id_table_foreach_values_func_t *func, rb_id_table_update_value_callback_func_t *replace, void *data);
11714struct rb_subclass_entry {
11715 VALUE klass;
11716 struct rb_subclass_entry *next;
11717 struct rb_subclass_entry *prev;
11718};
11719struct rb_iv_index_tbl_entry {
11720 uint32_t index;
11721 rb_serial_t class_serial;
11722 VALUE class_value;
11723};
11724struct rb_cvar_class_tbl_entry {
11725 uint32_t index;
11726 rb_serial_t global_cvar_state;
11727 VALUE class_value;
11728};
11729struct rb_classext_struct {
11730 struct st_table *iv_index_tbl;
11731 struct st_table *iv_tbl;
11732 struct rb_id_table *m_tbl;
11733 struct rb_id_table *const_tbl;
11734 struct rb_id_table *callable_m_tbl;
11735 struct rb_id_table *cc_tbl;
11736 struct rb_id_table *cvc_tbl;
11737 size_t superclass_depth;
11738 VALUE *superclasses;
11739 struct rb_subclass_entry *subclasses;
11740 struct rb_subclass_entry *subclass_entry;
11741 struct rb_subclass_entry *module_subclass_entry;
11742 const VALUE origin_;
11743 const VALUE refined_class;
11744 rb_alloc_func_t allocator;
11745 const VALUE includer;
11746};
11747struct RClass {
11748 struct RBasic basic;
11749 VALUE super;
11750 rb_serial_t class_serial;
11751};
11752typedef struct rb_subclass_entry rb_subclass_entry_t;
11753typedef struct rb_classext_struct rb_classext_t;
11754void rb_class_subclass_add(VALUE super, VALUE klass);
11755void rb_class_remove_from_super_subclasses(VALUE);
11756void rb_class_update_superclasses(VALUE);
11757size_t rb_class_superclasses_memsize(VALUE);
11758void rb_class_remove_subclass_head(VALUE);
11759int rb_singleton_class_internal_p(VALUE sklass);
11760VALUE rb_class_boot(VALUE);
11761VALUE rb_class_s_alloc(VALUE klass);
11762VALUE rb_module_s_alloc(VALUE klass);
11763void rb_module_set_initialized(VALUE module);
11764void rb_module_check_initializable(VALUE module);
11765VALUE rb_make_metaclass(VALUE, VALUE);
11766VALUE rb_include_class_new(VALUE, VALUE);
11767void rb_class_foreach_subclass(VALUE klass, void (*f)(VALUE, VALUE), VALUE);
11768void rb_class_detach_subclasses(VALUE);
11769void rb_class_detach_module_subclasses(VALUE);
11770void rb_class_remove_from_module_subclasses(VALUE);
11771VALUE rb_obj_methods(int argc, const VALUE *argv, VALUE obj);
11772VALUE rb_obj_protected_methods(int argc, const VALUE *argv, VALUE obj);
11773VALUE rb_obj_private_methods(int argc, const VALUE *argv, VALUE obj);
11774VALUE rb_obj_public_methods(int argc, const VALUE *argv, VALUE obj);
11775VALUE rb_class_undefined_instance_methods(VALUE mod);
11776VALUE rb_special_singleton_class(VALUE);
11777VALUE rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach);
11778VALUE rb_singleton_class_get(VALUE obj);
11779void rb_undef_methods_from(VALUE klass, VALUE super);
11780static inline void RCLASS_SET_ORIGIN(VALUE klass, VALUE origin);
11781static inline void RICLASS_SET_ORIGIN_SHARED_MTBL(VALUE iclass);
11782static inline VALUE RCLASS_SUPER(VALUE klass);
11783static inline VALUE RCLASS_SET_SUPER(VALUE klass, VALUE super);
11784static inline void RCLASS_SET_INCLUDER(VALUE iclass, VALUE klass);
11785
11786
11787VALUE rb_class_inherited(VALUE, VALUE);
11788VALUE rb_keyword_error_new(const char *, VALUE);
11789
11790
11791static inline void
11792RCLASS_SET_ORIGIN(VALUE klass, VALUE origin)
11793{
11794 rb_obj_write((VALUE)(klass), __extension__({
11795 ;
11796 ; __typeof__((VALUE *)(&(((rb_classext_t *)((char *)(klass) + sizeof(struct RClass)))->origin_))) unaligned_member_access_result = ((VALUE *)(&(((rb_classext_t *)((char *)(klass) + sizeof(struct RClass)))->origin_)));
11797 ; unaligned_member_access_result; }), (VALUE)(origin), "./internal/class.h", 172);
11798 if (klass != origin) RB_FL_SET(origin, ((VALUE)RUBY_FL_USER0));
11799}
11800static inline void
11801RICLASS_SET_ORIGIN_SHARED_MTBL(VALUE iclass)
11802{
11803 RB_FL_SET(iclass, ((VALUE)RUBY_FL_USER3));
11804}
11805static inline _Bool
11806RICLASS_OWNS_M_TBL_P(VALUE iclass)
11807{
11808 return RB_FL_TEST_RAW(iclass, ((VALUE)RUBY_FL_USER0) | ((VALUE)RUBY_FL_USER3)) == ((VALUE)RUBY_FL_USER0);
11809}
11810static inline void
11811RCLASS_SET_INCLUDER(VALUE iclass, VALUE klass)
11812{
11813 rb_obj_write((VALUE)(iclass), __extension__({
11814 ;
11815 ; __typeof__((VALUE *)(&(((rb_classext_t *)((char *)(iclass) + sizeof(struct RClass)))->includer))) unaligned_member_access_result = ((VALUE *)(&(((rb_classext_t *)((char *)(iclass) + sizeof(struct RClass)))->includer)));
11816 ; unaligned_member_access_result; }), (VALUE)(klass), "./internal/class.h", 191);
11817}
11818static inline VALUE
11819RCLASS_SUPER(VALUE klass)
11820{
11821 return ((struct RClass *)(klass))->super;
11822}
11823static inline VALUE
11824RCLASS_SET_SUPER(VALUE klass, VALUE super)
11825{
11826 if (super) {
11827 rb_class_remove_from_super_subclasses(klass);
11828 rb_class_subclass_add(super, klass);
11829 }
11830 rb_obj_write((VALUE)(klass), __extension__({
11831 ;
11832 ; __typeof__((VALUE *)(&((struct RClass *)(klass))->super)) unaligned_member_access_result = ((VALUE *)(&((struct RClass *)(klass))->super));
11833 ; unaligned_member_access_result; }), (VALUE)(super), "./internal/class.h", 207);
11834 rb_class_update_superclasses(klass);
11835 return super;
11836}
11837VALUE rb_class_search_ancestor(VALUE klass, VALUE super);
11838__attribute__((__noreturn__)) void rb_undefined_alloc(VALUE klass);
11839double rb_num_to_dbl(VALUE val);
11840VALUE rb_obj_dig(int argc, VALUE *argv, VALUE self, VALUE notfound);
11841VALUE rb_immutable_obj_clone(int, VALUE *, VALUE);
11842VALUE rb_check_convert_type_with_id(VALUE,int,const char*,ID);
11843int rb_bool_expected(VALUE, const char *);
11844static inline void RBASIC_CLEAR_CLASS(VALUE obj);
11845static inline void RBASIC_SET_CLASS_RAW(VALUE obj, VALUE klass);
11846static inline void RBASIC_SET_CLASS(VALUE obj, VALUE klass);
11847static inline struct st_table *ROBJECT_IV_INDEX_TBL_inline(VALUE obj);
11848
11849
11850int rb_opts_exception_p(VALUE opts, int default_value);
11851
11852
11853
11854
11855__attribute__((__const__)) VALUE rb_obj_equal(VALUE obj1, VALUE obj2);
11856__attribute__((__const__)) VALUE rb_obj_not(VALUE obj);
11857VALUE rb_obj_not_equal(VALUE obj1, VALUE obj2);
11858void rb_obj_copy_ivar(VALUE dest, VALUE obj);
11859VALUE rb_false(VALUE obj);
11860VALUE rb_convert_type_with_id(VALUE v, int t, const char* nam, ID mid);
11861VALUE rb_obj_size(VALUE self, VALUE args, VALUE obj);
11862VALUE rb_get_freeze_opt(int argc, VALUE *argv);
11863
11864
11865static inline void
11866RBASIC_SET_CLASS_RAW(VALUE obj, VALUE klass)
11867{
11868 const VALUE *ptr = &((struct RBasic *)(obj))->klass;
11869 *(VALUE *)ptr = klass;
11870}
11871static inline void
11872RBASIC_CLEAR_CLASS(VALUE obj)
11873{
11874 RBASIC_SET_CLASS_RAW(obj, 0);
11875}
11876static inline void
11877RBASIC_SET_CLASS(VALUE obj, VALUE klass)
11878{
11879 VALUE oldv = RBASIC_CLASS(obj);
11880 RBASIC_SET_CLASS_RAW(obj, klass);
11881 (rb_obj_written((VALUE)(obj), (VALUE)(oldv), (VALUE)(klass), "./internal/object.h", 65));
11882}
11883__attribute__((__pure__))
11884static inline struct st_table *
11885ROBJECT_IV_INDEX_TBL_inline(VALUE obj)
11886{
11887 if (RB_FL_ANY_RAW(obj, ROBJECT_EMBED)) {
11888 VALUE klass = rb_obj_class(obj);
11889 return (((rb_classext_t *)((char *)(klass) + sizeof(struct RClass)))->iv_index_tbl);
11890 }
11891 else {
11892 const struct RObject *const ptr = ((struct RObject *)(obj));
11893 return ptr->as.heap.iv_index_tbl;
11894 }
11895}
11896struct rb_iseq_struct;
11897VALUE rb_parser_set_yydebug(VALUE, VALUE);
11898void *rb_parser_load_file(VALUE parser, VALUE name);
11899void rb_parser_keep_script_lines(VALUE vparser);
11900
11901
11902VALUE rb_parser_set_context(VALUE, const struct rb_iseq_struct *, int);
11903
11904
11905struct rb_block;
11906struct rb_iseq_struct;
11907VALUE rb_proc_location(VALUE self);
11908st_index_t rb_hash_proc(st_index_t hash, VALUE proc);
11909int rb_block_pair_yield_optimizable(void);
11910int rb_block_arity(void);
11911int rb_block_min_max_arity(int *max);
11912VALUE rb_block_to_s(VALUE self, const struct rb_block *block, const char *additional_info);
11913VALUE rb_callable_receiver(VALUE);
11914
11915
11916VALUE rb_func_proc_new(rb_block_call_func_t func, VALUE val);
11917VALUE rb_func_lambda_new(rb_block_call_func_t func, VALUE val, int min_argc, int max_argc);
11918VALUE rb_iseq_location(const struct rb_iseq_struct *iseq);
11919VALUE rb_sym_to_proc(VALUE sym);
11920
11921
11922VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline);
11923VALUE rb_reg_check_preprocess(VALUE);
11924long rb_reg_search0(VALUE, VALUE, long, int, int);
11925VALUE rb_reg_match_p(VALUE re, VALUE str, long pos);
11926_Bool rb_reg_start_with_p(VALUE re, VALUE str);
11927VALUE rb_reg_hash(VALUE re);
11928VALUE rb_reg_equal(VALUE re1, VALUE re2);
11929void rb_backref_set_string(VALUE string, long pos, long len);
11930void rb_match_unbusy(VALUE);
11931int rb_match_count(VALUE match);
11932int rb_match_nth_defined(int nth, VALUE match);
11933
11934
11935VALUE rb_reg_new_ary(VALUE ary, int options);
11936
11937
11938VALUE rb_to_symbol_type(VALUE obj);
11939VALUE rb_sym_intern(const char *ptr, long len, rb_encoding *enc);
11940VALUE rb_sym_intern_ascii(const char *ptr, long len);
11941VALUE rb_sym_intern_ascii_cstr(const char *ptr);
11942int rb_is_const_name(VALUE name);
11943int rb_is_class_name(VALUE name);
11944int rb_is_instance_name(VALUE name);
11945int rb_is_local_name(VALUE name);
11946__attribute__((__pure__)) int rb_is_const_sym(VALUE sym);
11947__attribute__((__pure__)) int rb_is_attrset_sym(VALUE sym);
11948ID rb_make_internal_id(void);
11949ID rb_make_temporary_id(size_t n);
11950void rb_gc_free_dsymbol(VALUE);
11951struct rb_thread_struct;
11952VALUE rb_obj_is_mutex(VALUE obj);
11953VALUE rb_suppress_tracing(VALUE (*func)(VALUE), VALUE arg);
11954void rb_thread_execute_interrupts(VALUE th);
11955VALUE rb_get_coverages(void);
11956int rb_get_coverage_mode(void);
11957VALUE rb_default_coverage(int);
11958VALUE rb_thread_shield_new(void);
11959VALUE rb_thread_shield_wait(VALUE self);
11960VALUE rb_thread_shield_release(VALUE self);
11961VALUE rb_thread_shield_destroy(VALUE self);
11962int rb_thread_to_be_killed(VALUE thread);
11963void rb_mutex_allow_trap(VALUE self, int val);
11964VALUE rb_uninterruptible(VALUE (*b_proc)(VALUE), VALUE data);
11965VALUE rb_mutex_owned_p(VALUE self);
11966int rb_thread_wait_for_single_fd(int fd, int events, struct timeval * timeout);
11967
11968
11969VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd);
11970int ruby_thread_has_gvl_p(void);
11971
11972
11973
11974
11975int rb_threadptr_execute_interrupts(struct rb_thread_struct *th, int blocking_timing);
11976
11977
11978typedef
11979 struct {
11980 unsigned long int nraddr;
11981 }
11982 OrigFn;
11983typedef
11984 enum { VG_USERREQ__RUNNING_ON_VALGRIND = 0x1001,
11985 VG_USERREQ__DISCARD_TRANSLATIONS = 0x1002,
11986 VG_USERREQ__CLIENT_CALL0 = 0x1101,
11987 VG_USERREQ__CLIENT_CALL1 = 0x1102,
11988 VG_USERREQ__CLIENT_CALL2 = 0x1103,
11989 VG_USERREQ__CLIENT_CALL3 = 0x1104,
11990 VG_USERREQ__COUNT_ERRORS = 0x1201,
11991 VG_USERREQ__GDB_MONITOR_COMMAND = 0x1202,
11992 VG_USERREQ__CLO_CHANGE = 0x1203,
11993 VG_USERREQ__MALLOCLIKE_BLOCK = 0x1301,
11994 VG_USERREQ__RESIZEINPLACE_BLOCK = 0x130b,
11995 VG_USERREQ__FREELIKE_BLOCK = 0x1302,
11996 VG_USERREQ__CREATE_MEMPOOL = 0x1303,
11997 VG_USERREQ__DESTROY_MEMPOOL = 0x1304,
11998 VG_USERREQ__MEMPOOL_ALLOC = 0x1305,
11999 VG_USERREQ__MEMPOOL_FREE = 0x1306,
12000 VG_USERREQ__MEMPOOL_TRIM = 0x1307,
12001 VG_USERREQ__MOVE_MEMPOOL = 0x1308,
12002 VG_USERREQ__MEMPOOL_CHANGE = 0x1309,
12003 VG_USERREQ__MEMPOOL_EXISTS = 0x130a,
12004 VG_USERREQ__PRINTF = 0x1401,
12005 VG_USERREQ__PRINTF_BACKTRACE = 0x1402,
12006 VG_USERREQ__PRINTF_VALIST_BY_REF = 0x1403,
12007 VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF = 0x1404,
12008 VG_USERREQ__STACK_REGISTER = 0x1501,
12009 VG_USERREQ__STACK_DEREGISTER = 0x1502,
12010 VG_USERREQ__STACK_CHANGE = 0x1503,
12011 VG_USERREQ__LOAD_PDB_DEBUGINFO = 0x1601,
12012 VG_USERREQ__MAP_IP_TO_SRCLOC = 0x1701,
12013 VG_USERREQ__CHANGE_ERR_DISABLEMENT = 0x1801,
12014 VG_USERREQ__VEX_INIT_FOR_IRI = 0x1901,
12015 VG_USERREQ__INNER_THREADS = 0x1902
12016 } Vg_ClientRequest;
12017static int VALGRIND_PRINTF(const char *format, ...)
12018 __attribute__((format(__printf__, 1, 2), __unused__));
12019static int
12020VALGRIND_PRINTF(const char *format, ...)
12021{
12022 unsigned long _qzz_res;
12023 va_list vargs;
12024 __builtin_va_start(vargs,format);
12025 _qzz_res = __extension__ ({ volatile unsigned long int _zzq_args[6]; volatile unsigned long int _zzq_result; _zzq_args[0] = (unsigned long int)(VG_USERREQ__PRINTF_VALIST_BY_REF); _zzq_args[1] = (unsigned long int)((unsigned long)format); _zzq_args[2] = (unsigned long int)((unsigned long)&vargs); _zzq_args[3] = (unsigned long int)(0); _zzq_args[4] = (unsigned long int)(0); _zzq_args[5] = (unsigned long int)(0); __asm__ volatile("rolq $3, %%rdi ; rolq $13, %%rdi\n\t" "rolq $61, %%rdi ; rolq $51, %%rdi\n\t" "xchgq %%rbx,%%rbx" : "=d" (_zzq_result) : "a" (&_zzq_args[0]), "0" (0) : "cc", "memory" ); _zzq_result; });
12026 __builtin_va_end(vargs);
12027 return (int)_qzz_res;
12028}
12029static int VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
12030 __attribute__((format(__printf__, 1, 2), __unused__));
12031static int
12032VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
12033{
12034 unsigned long _qzz_res;
12035 va_list vargs;
12036 __builtin_va_start(vargs,format);
12037 _qzz_res = __extension__ ({ volatile unsigned long int _zzq_args[6]; volatile unsigned long int _zzq_result; _zzq_args[0] = (unsigned long int)(VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF); _zzq_args[1] = (unsigned long int)((unsigned long)format); _zzq_args[2] = (unsigned long int)((unsigned long)&vargs); _zzq_args[3] = (unsigned long int)(0); _zzq_args[4] = (unsigned long int)(0); _zzq_args[5] = (unsigned long int)(0); __asm__ volatile("rolq $3, %%rdi ; rolq $13, %%rdi\n\t" "rolq $61, %%rdi ; rolq $51, %%rdi\n\t" "xchgq %%rbx,%%rbx" : "=d" (_zzq_result) : "a" (&_zzq_args[0]), "0" (0) : "cc", "memory" ); _zzq_result; });
12038 __builtin_va_end(vargs);
12039 return (int)_qzz_res;
12040}
12041typedef
12042 enum {
12043 VG_USERREQ__MAKE_MEM_NOACCESS = ((unsigned int)((('M')&0xff) << 24 | (('C')&0xff) << 16)),
12044 VG_USERREQ__MAKE_MEM_UNDEFINED,
12045 VG_USERREQ__MAKE_MEM_DEFINED,
12046 VG_USERREQ__DISCARD,
12047 VG_USERREQ__CHECK_MEM_IS_ADDRESSABLE,
12048 VG_USERREQ__CHECK_MEM_IS_DEFINED,
12049 VG_USERREQ__DO_LEAK_CHECK,
12050 VG_USERREQ__COUNT_LEAKS,
12051 VG_USERREQ__GET_VBITS,
12052 VG_USERREQ__SET_VBITS,
12053 VG_USERREQ__CREATE_BLOCK,
12054 VG_USERREQ__MAKE_MEM_DEFINED_IF_ADDRESSABLE,
12055 VG_USERREQ__COUNT_LEAK_BLOCKS,
12056 VG_USERREQ__ENABLE_ADDR_ERROR_REPORTING_IN_RANGE,
12057 VG_USERREQ__DISABLE_ADDR_ERROR_REPORTING_IN_RANGE,
12058 _VG_USERREQ__MEMCHECK_RECORD_OVERLAP_ERROR
12059 = ((unsigned int)((('M')&0xff) << 24 | (('C')&0xff) << 16)) + 256
12060 } Vg_MemCheckClientRequest;
12061typedef struct {
12062 int coverage_sandboxed;
12063 intptr_t coverage_fd;
12064 unsigned int coverage_max_block_size;
12065} __sanitizer_sandbox_arguments;
12066void __sanitizer_set_report_path(const char *path);
12067void __sanitizer_set_report_fd(void *fd);
12068const char *__sanitizer_get_report_path();
12069void __sanitizer_sandbox_on_notify(__sanitizer_sandbox_arguments *args);
12070void __sanitizer_report_error_summary(const char *error_summary);
12071uint16_t __sanitizer_unaligned_load16(const void *p);
12072uint32_t __sanitizer_unaligned_load32(const void *p);
12073uint64_t __sanitizer_unaligned_load64(const void *p);
12074void __sanitizer_unaligned_store16(void *p, uint16_t x);
12075void __sanitizer_unaligned_store32(void *p, uint32_t x);
12076void __sanitizer_unaligned_store64(void *p, uint64_t x);
12077int __sanitizer_acquire_crash_state();
12078void __sanitizer_annotate_contiguous_container(const void *beg,
12079 const void *end,
12080 const void *old_mid,
12081 const void *new_mid);
12082int __sanitizer_verify_contiguous_container(const void *beg, const void *mid,
12083 const void *end);
12084const void *__sanitizer_contiguous_container_find_bad_address(const void *beg,
12085 const void *mid,
12086 const void *end);
12087void __sanitizer_print_stack_trace(void);
12088void __sanitizer_symbolize_pc(void *pc, const char *fmt, char *out_buf,
12089 size_t out_buf_size);
12090void __sanitizer_symbolize_global(void *data_ptr, const char *fmt,
12091 char *out_buf, size_t out_buf_size);
12092void __sanitizer_set_death_callback(void (*callback)(void));
12093void __sanitizer_weak_hook_memcmp(void *called_pc, const void *s1,
12094 const void *s2, size_t n, int result);
12095void __sanitizer_weak_hook_strncmp(void *called_pc, const char *s1,
12096 const char *s2, size_t n, int result);
12097void __sanitizer_weak_hook_strncasecmp(void *called_pc, const char *s1,
12098 const char *s2, size_t n, int result);
12099void __sanitizer_weak_hook_strcmp(void *called_pc, const char *s1,
12100 const char *s2, int result);
12101void __sanitizer_weak_hook_strcasecmp(void *called_pc, const char *s1,
12102 const char *s2, int result);
12103void __sanitizer_weak_hook_strstr(void *called_pc, const char *s1,
12104 const char *s2, char *result);
12105void __sanitizer_weak_hook_strcasestr(void *called_pc, const char *s1,
12106 const char *s2, char *result);
12107void __sanitizer_weak_hook_memmem(void *called_pc,
12108 const void *s1, size_t len1,
12109 const void *s2, size_t len2, void *result);
12110void __sanitizer_print_memory_profile(size_t top_percent,
12111 size_t max_number_of_contexts);
12112void __sanitizer_start_switch_fiber(void **fake_stack_save,
12113 const void *bottom, size_t size);
12114void __sanitizer_finish_switch_fiber(void *fake_stack_save,
12115 const void **bottom_old,
12116 size_t *size_old);
12117int __sanitizer_get_module_and_offset_for_pc(void *pc, char *module_path,
12118 size_t module_path_len,
12119 void **pc_offset);
12120void __asan_poison_memory_region(void const volatile *addr, size_t size);
12121void __asan_unpoison_memory_region(void const volatile *addr, size_t size);
12122int __asan_address_is_poisoned(void const volatile *addr);
12123void *__asan_region_is_poisoned(void *beg, size_t size);
12124void __asan_describe_address(void *addr);
12125int __asan_report_present(void);
12126void *__asan_get_report_pc(void);
12127void *__asan_get_report_bp(void);
12128void *__asan_get_report_sp(void);
12129void *__asan_get_report_address(void);
12130int __asan_get_report_access_type(void);
12131size_t __asan_get_report_access_size(void);
12132const char *__asan_get_report_description(void);
12133const char *__asan_locate_address(void *addr, char *name, size_t name_size,
12134 void **region_address, size_t *region_size);
12135size_t __asan_get_alloc_stack(void *addr, void **trace, size_t size,
12136 int *thread_id);
12137size_t __asan_get_free_stack(void *addr, void **trace, size_t size,
12138 int *thread_id);
12139void __asan_get_shadow_mapping(size_t *shadow_scale, size_t *shadow_offset);
12140void __asan_report_error(void *pc, void *bp, void *sp,
12141 void *addr, int is_write, size_t access_size);
12142void __asan_set_death_callback(void (*callback)(void));
12143void __asan_set_error_report_callback(void (*callback)(const char *));
12144void __asan_on_error(void);
12145void __asan_print_accumulated_stats(void);
12146const char* __asan_default_options(void);
12147void *__asan_get_current_fake_stack(void);
12148void *__asan_addr_is_in_fake_stack(void *fake_stack, void *addr, void **beg,
12149 void **end);
12150void __asan_handle_no_return(void);
12151int __asan_update_allocation_context(void* addr);
12152extern const int ruby_api_version[];
12153extern const ID rb_iseq_shared_exc_local_tbl[];
12154static inline rb_snum_t
12155ISEQ_FLIP_CNT_INCREMENT(const rb_iseq_t *iseq)
12156{
12157 rb_snum_t cnt = ((iseq)->body)->variable.flip_count;
12158 ((iseq)->body)->variable.flip_count += 1;
12159 return cnt;
12160}
12161static inline VALUE *
12162ISEQ_ORIGINAL_ISEQ(const rb_iseq_t *iseq)
12163{
12164 return ((iseq)->body)->variable.original_iseq;
12165}
12166static inline void
12167ISEQ_ORIGINAL_ISEQ_CLEAR(const rb_iseq_t *iseq)
12168{
12169 void *ptr = ((iseq)->body)->variable.original_iseq;
12170 ((iseq)->body)->variable.original_iseq = ((void *)0);
12171 if (ptr) {
12172 ruby_xfree(ptr);
12173 }
12174}
12175static inline VALUE *
12176ISEQ_ORIGINAL_ISEQ_ALLOC(const rb_iseq_t *iseq, long size)
12177{
12178 return ((iseq)->body)->variable.original_iseq =
12179 ((VALUE *)ruby_xmalloc2((size), sizeof(VALUE)));
12180}
12181struct iseq_compile_data {
12182 const VALUE err_info;
12183 const VALUE catch_table_ary;
12184 struct iseq_label_data *start_label;
12185 struct iseq_label_data *end_label;
12186 struct iseq_label_data *redo_label;
12187 const rb_iseq_t *current_block;
12188 struct iseq_compile_data_ensure_node_stack *ensure_node_stack;
12189 struct {
12190 struct iseq_compile_data_storage *storage_head;
12191 struct iseq_compile_data_storage *storage_current;
12192 } node;
12193 struct {
12194 struct iseq_compile_data_storage *storage_head;
12195 struct iseq_compile_data_storage *storage_current;
12196 } insn;
12197 _Bool in_rescue;
12198 int loopval_popped;
12199 int last_line;
12200 int label_no;
12201 int node_level;
12202 int isolated_depth;
12203 unsigned int ci_index;
12204 const rb_compile_option_t *option;
12205 struct rb_id_table *ivar_cache_table;
12206 const struct rb_builtin_function *builtin_function_table;
12207 const NODE *root_node;
12208};
12209static inline struct iseq_compile_data *
12210ISEQ_COMPILE_DATA(const rb_iseq_t *iseq)
12211{
12212 if (iseq->flags & ((VALUE)RUBY_FL_USER6)) {
12213 return iseq->aux.compile_data;
12214 }
12215 else {
12216 return ((void *)0);
12217 }
12218}
12219static inline void
12220ISEQ_COMPILE_DATA_ALLOC(rb_iseq_t *iseq)
12221{
12222 iseq->aux.compile_data = (((struct iseq_compile_data *)ruby_xcalloc((1), sizeof(struct iseq_compile_data))));
12223 iseq->flags |= ((VALUE)RUBY_FL_USER6);
12224}
12225static inline void
12226ISEQ_COMPILE_DATA_CLEAR(rb_iseq_t *iseq)
12227{
12228 iseq->flags &= ~((VALUE)RUBY_FL_USER6);
12229 iseq->aux.compile_data = ((void *)0);
12230}
12231static inline rb_iseq_t *
12232iseq_imemo_alloc(void)
12233{
12234 return (rb_iseq_t *)rb_imemo_new(imemo_iseq, 0, 0, 0, 0);
12235}
12236VALUE rb_iseq_ibf_dump(const rb_iseq_t *iseq, VALUE opt);
12237void rb_ibf_load_iseq_complete(rb_iseq_t *iseq);
12238const rb_iseq_t *rb_iseq_ibf_load(VALUE str);
12239const rb_iseq_t *rb_iseq_ibf_load_bytes(const char *cstr, size_t);
12240VALUE rb_iseq_ibf_load_extra_data(VALUE str);
12241void rb_iseq_init_trace(rb_iseq_t *iseq);
12242int rb_iseq_add_local_tracepoint_recursively(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval, unsigned int target_line, _Bool target_bmethod);
12243int rb_iseq_remove_local_tracepoint_recursively(const rb_iseq_t *iseq, VALUE tpval);
12244const rb_iseq_t *rb_iseq_load_iseq(VALUE fname);
12245unsigned int *rb_iseq_insns_info_decode_positions(const struct rb_iseq_constant_body *body);
12246int rb_vm_insn_addr2opcode(const void *addr);
12247
12248
12249VALUE rb_iseq_compile_node(rb_iseq_t *iseq, const NODE *node);
12250VALUE rb_iseq_compile_callback(rb_iseq_t *iseq, const struct rb_iseq_new_with_callback_callback_func * ifunc);
12251VALUE *rb_iseq_original_iseq(const rb_iseq_t *iseq);
12252void rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE misc,
12253 VALUE locals, VALUE args,
12254 VALUE exception, VALUE body);
12255void rb_iseq_mark_insn_storage(struct iseq_compile_data_storage *arena);
12256typedef _Bool rb_iseq_each_i(VALUE *code, VALUE insn, size_t index, void *data);
12257void rb_iseq_each(const rb_iseq_t *iseq, size_t start_index, rb_iseq_each_i iterator, void *data);
12258VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt);
12259VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc);
12260unsigned int rb_iseq_line_no(const rb_iseq_t *iseq, size_t pos);
12261int rb_iseq_node_id(const rb_iseq_t *iseq, size_t pos);
12262void rb_iseq_trace_set(const rb_iseq_t *iseq, rb_event_flag_t turnon_events);
12263void rb_iseq_trace_set_all(rb_event_flag_t turnon_events);
12264void rb_iseq_insns_info_encode_positions(const rb_iseq_t *iseq);
12265struct rb_iseq_constant_body *rb_iseq_constant_body_alloc(void);
12266VALUE rb_iseqw_new(const rb_iseq_t *iseq);
12267const rb_iseq_t *rb_iseqw_to_iseq(VALUE iseqw);
12268VALUE rb_iseq_absolute_path(const rb_iseq_t *iseq);
12269int rb_iseq_from_eval_p(const rb_iseq_t *iseq);
12270VALUE rb_iseq_type(const rb_iseq_t *iseq);
12271VALUE rb_iseq_label(const rb_iseq_t *iseq);
12272VALUE rb_iseq_base_label(const rb_iseq_t *iseq);
12273VALUE rb_iseq_first_lineno(const rb_iseq_t *iseq);
12274VALUE rb_iseq_method_name(const rb_iseq_t *iseq);
12275void rb_iseq_code_location(const rb_iseq_t *iseq, int *first_lineno, int *first_column, int *last_lineno, int *last_column);
12276void rb_iseq_remove_coverage_all(void);
12277const rb_iseq_t *rb_method_iseq(VALUE body);
12278const rb_iseq_t *rb_proc_get_iseq(VALUE proc, int *is_proc);
12279struct rb_compile_option_struct {
12280 unsigned int inline_const_cache: 1;
12281 unsigned int peephole_optimization: 1;
12282 unsigned int tailcall_optimization: 1;
12283 unsigned int specialized_instruction: 1;
12284 unsigned int operands_unification: 1;
12285 unsigned int instructions_unification: 1;
12286 unsigned int stack_caching: 1;
12287 unsigned int frozen_string_literal: 1;
12288 unsigned int debug_frozen_string_literal: 1;
12289 unsigned int coverage_enabled: 1;
12290 int debug_level;
12291};
12292struct iseq_insn_info_entry {
12293 int line_no;
12294 int node_id;
12295 rb_event_flag_t events;
12296};
12297struct iseq_catch_table_entry {
12298 enum catch_type {
12299 CATCH_TYPE_RESCUE = __builtin_choose_expr( __builtin_constant_p(1), ((VALUE)(1)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(1)),
12300 CATCH_TYPE_ENSURE = __builtin_choose_expr( __builtin_constant_p(2), ((VALUE)(2)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(2)),
12301 CATCH_TYPE_RETRY = __builtin_choose_expr( __builtin_constant_p(3), ((VALUE)(3)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(3)),
12302 CATCH_TYPE_BREAK = __builtin_choose_expr( __builtin_constant_p(4), ((VALUE)(4)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(4)),
12303 CATCH_TYPE_REDO = __builtin_choose_expr( __builtin_constant_p(5), ((VALUE)(5)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(5)),
12304 CATCH_TYPE_NEXT = __builtin_choose_expr( __builtin_constant_p(6), ((VALUE)(6)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(6))
12305 } type;
12306 rb_iseq_t *iseq;
12307 unsigned int start;
12308 unsigned int end;
12309 unsigned int cont;
12310 unsigned int sp;
12311};
12312struct iseq_catch_table { unsigned int size; struct iseq_catch_table_entry entries[]; } __attribute__((packed));
12313static inline int
12314iseq_catch_table_bytes(int n)
12315{
12316 enum {
12317 catch_table_entry_size = sizeof(struct iseq_catch_table_entry),
12318 catch_table_entries_max = (0x7fffffff - __builtin_offsetof (struct iseq_catch_table, entries)) / catch_table_entry_size
12319 };
12320 if (n > catch_table_entries_max) rb_fatal("too large iseq_catch_table - %d", n);
12321 return (int)(__builtin_offsetof (struct iseq_catch_table, entries) +
12322 n * catch_table_entry_size);
12323}
12324struct iseq_compile_data_storage {
12325 struct iseq_compile_data_storage *next;
12326 unsigned int pos;
12327 unsigned int size;
12328 char buff[];
12329};
12330enum defined_type {
12331 DEFINED_NOT_DEFINED,
12332 DEFINED_NIL = 1,
12333 DEFINED_IVAR,
12334 DEFINED_LVAR,
12335 DEFINED_GVAR,
12336 DEFINED_CVAR,
12337 DEFINED_CONST,
12338 DEFINED_METHOD,
12339 DEFINED_YIELD,
12340 DEFINED_ZSUPER,
12341 DEFINED_SELF,
12342 DEFINED_TRUE,
12343 DEFINED_FALSE,
12344 DEFINED_ASGN,
12345 DEFINED_EXPR,
12346 DEFINED_REF,
12347 DEFINED_FUNC,
12348 DEFINED_CONST_FROM
12349};
12350VALUE rb_iseq_defined_string(enum defined_type type);
12351VALUE rb_iseq_local_variables(const rb_iseq_t *iseq);
12352
12353
12354enum rb_debug_counter_type {
12355RB_DEBUG_COUNTER_mc_inline_hit,
12356RB_DEBUG_COUNTER_mc_inline_miss_klass,
12357RB_DEBUG_COUNTER_mc_inline_miss_invalidated,
12358RB_DEBUG_COUNTER_mc_inline_miss_empty,
12359RB_DEBUG_COUNTER_mc_inline_miss_same_cc,
12360RB_DEBUG_COUNTER_mc_inline_miss_same_cme,
12361RB_DEBUG_COUNTER_mc_inline_miss_same_def,
12362RB_DEBUG_COUNTER_mc_inline_miss_diff,
12363RB_DEBUG_COUNTER_cvar_write_inline_hit,
12364RB_DEBUG_COUNTER_cvar_read_inline_hit,
12365RB_DEBUG_COUNTER_cvar_inline_miss,
12366RB_DEBUG_COUNTER_cvar_class_invalidate,
12367RB_DEBUG_COUNTER_cvar_include_invalidate,
12368RB_DEBUG_COUNTER_mc_cme_complement,
12369RB_DEBUG_COUNTER_mc_cme_complement_hit,
12370RB_DEBUG_COUNTER_mc_search,
12371RB_DEBUG_COUNTER_mc_search_notfound,
12372RB_DEBUG_COUNTER_mc_search_super,
12373RB_DEBUG_COUNTER_ci_packed,
12374RB_DEBUG_COUNTER_ci_kw,
12375RB_DEBUG_COUNTER_ci_nokw,
12376RB_DEBUG_COUNTER_ci_runtime,
12377RB_DEBUG_COUNTER_cc_new,
12378RB_DEBUG_COUNTER_cc_temp,
12379RB_DEBUG_COUNTER_cc_found_in_ccs,
12380RB_DEBUG_COUNTER_cc_not_found_in_ccs,
12381RB_DEBUG_COUNTER_cc_ent_invalidate,
12382RB_DEBUG_COUNTER_cc_cme_invalidate,
12383RB_DEBUG_COUNTER_cc_invalidate_leaf,
12384RB_DEBUG_COUNTER_cc_invalidate_leaf_ccs,
12385RB_DEBUG_COUNTER_cc_invalidate_leaf_callable,
12386RB_DEBUG_COUNTER_cc_invalidate_tree,
12387RB_DEBUG_COUNTER_cc_invalidate_tree_cme,
12388RB_DEBUG_COUNTER_cc_invalidate_tree_callable,
12389RB_DEBUG_COUNTER_cc_invalidate_negative,
12390RB_DEBUG_COUNTER_ccs_free,
12391RB_DEBUG_COUNTER_ccs_maxlen,
12392RB_DEBUG_COUNTER_ccs_found,
12393RB_DEBUG_COUNTER_ccs_not_found,
12394RB_DEBUG_COUNTER_call0_public,
12395RB_DEBUG_COUNTER_call0_other,
12396RB_DEBUG_COUNTER_gccct_hit,
12397RB_DEBUG_COUNTER_gccct_miss,
12398RB_DEBUG_COUNTER_gccct_null,
12399RB_DEBUG_COUNTER_iseq_num,
12400RB_DEBUG_COUNTER_iseq_cd_num,
12401RB_DEBUG_COUNTER_ccf_general,
12402RB_DEBUG_COUNTER_ccf_iseq_setup,
12403RB_DEBUG_COUNTER_ccf_iseq_setup_0start,
12404RB_DEBUG_COUNTER_ccf_iseq_setup_tailcall_0start,
12405RB_DEBUG_COUNTER_ccf_iseq_fix,
12406RB_DEBUG_COUNTER_ccf_iseq_opt,
12407RB_DEBUG_COUNTER_ccf_iseq_kw1,
12408RB_DEBUG_COUNTER_ccf_iseq_kw2,
12409RB_DEBUG_COUNTER_ccf_cfunc,
12410RB_DEBUG_COUNTER_ccf_cfunc_with_frame,
12411RB_DEBUG_COUNTER_ccf_ivar,
12412RB_DEBUG_COUNTER_ccf_attrset,
12413RB_DEBUG_COUNTER_ccf_method_missing,
12414RB_DEBUG_COUNTER_ccf_zsuper,
12415RB_DEBUG_COUNTER_ccf_bmethod,
12416RB_DEBUG_COUNTER_ccf_opt_send,
12417RB_DEBUG_COUNTER_ccf_opt_call,
12418RB_DEBUG_COUNTER_ccf_opt_block_call,
12419RB_DEBUG_COUNTER_ccf_opt_struct_aref,
12420RB_DEBUG_COUNTER_ccf_opt_struct_aset,
12421RB_DEBUG_COUNTER_ccf_super_method,
12422RB_DEBUG_COUNTER_frame_push,
12423RB_DEBUG_COUNTER_frame_push_method,
12424RB_DEBUG_COUNTER_frame_push_block,
12425RB_DEBUG_COUNTER_frame_push_class,
12426RB_DEBUG_COUNTER_frame_push_top,
12427RB_DEBUG_COUNTER_frame_push_cfunc,
12428RB_DEBUG_COUNTER_frame_push_ifunc,
12429RB_DEBUG_COUNTER_frame_push_eval,
12430RB_DEBUG_COUNTER_frame_push_rescue,
12431RB_DEBUG_COUNTER_frame_push_dummy,
12432RB_DEBUG_COUNTER_frame_R2R,
12433RB_DEBUG_COUNTER_frame_R2C,
12434RB_DEBUG_COUNTER_frame_C2C,
12435RB_DEBUG_COUNTER_frame_C2R,
12436RB_DEBUG_COUNTER_ivar_get_ic_hit,
12437RB_DEBUG_COUNTER_ivar_get_ic_miss,
12438RB_DEBUG_COUNTER_ivar_get_ic_miss_serial,
12439RB_DEBUG_COUNTER_ivar_get_ic_miss_unset,
12440RB_DEBUG_COUNTER_ivar_get_ic_miss_noobject,
12441RB_DEBUG_COUNTER_ivar_set_ic_hit,
12442RB_DEBUG_COUNTER_ivar_set_ic_miss,
12443RB_DEBUG_COUNTER_ivar_set_ic_miss_serial,
12444RB_DEBUG_COUNTER_ivar_set_ic_miss_unset,
12445RB_DEBUG_COUNTER_ivar_set_ic_miss_iv_hit,
12446RB_DEBUG_COUNTER_ivar_set_ic_miss_noobject,
12447RB_DEBUG_COUNTER_ivar_get_base,
12448RB_DEBUG_COUNTER_ivar_set_base,
12449RB_DEBUG_COUNTER_lvar_get,
12450RB_DEBUG_COUNTER_lvar_get_dynamic,
12451RB_DEBUG_COUNTER_lvar_set,
12452RB_DEBUG_COUNTER_lvar_set_dynamic,
12453RB_DEBUG_COUNTER_lvar_set_slowpath,
12454RB_DEBUG_COUNTER_gc_count,
12455RB_DEBUG_COUNTER_gc_minor_newobj,
12456RB_DEBUG_COUNTER_gc_minor_malloc,
12457RB_DEBUG_COUNTER_gc_minor_method,
12458RB_DEBUG_COUNTER_gc_minor_capi,
12459RB_DEBUG_COUNTER_gc_minor_stress,
12460RB_DEBUG_COUNTER_gc_major_nofree,
12461RB_DEBUG_COUNTER_gc_major_oldgen,
12462RB_DEBUG_COUNTER_gc_major_shady,
12463RB_DEBUG_COUNTER_gc_major_force,
12464RB_DEBUG_COUNTER_gc_major_oldmalloc,
12465RB_DEBUG_COUNTER_gc_enter_start,
12466RB_DEBUG_COUNTER_gc_enter_mark_continue,
12467RB_DEBUG_COUNTER_gc_enter_sweep_continue,
12468RB_DEBUG_COUNTER_gc_enter_rest,
12469RB_DEBUG_COUNTER_gc_enter_finalizer,
12470RB_DEBUG_COUNTER_gc_isptr_trial,
12471RB_DEBUG_COUNTER_gc_isptr_range,
12472RB_DEBUG_COUNTER_gc_isptr_align,
12473RB_DEBUG_COUNTER_gc_isptr_maybe,
12474RB_DEBUG_COUNTER_obj_newobj,
12475RB_DEBUG_COUNTER_obj_newobj_slowpath,
12476RB_DEBUG_COUNTER_obj_newobj_wb_unprotected,
12477RB_DEBUG_COUNTER_obj_free,
12478RB_DEBUG_COUNTER_obj_promote,
12479RB_DEBUG_COUNTER_obj_wb_unprotect,
12480RB_DEBUG_COUNTER_obj_obj_embed,
12481RB_DEBUG_COUNTER_obj_obj_transient,
12482RB_DEBUG_COUNTER_obj_obj_ptr,
12483RB_DEBUG_COUNTER_obj_str_ptr,
12484RB_DEBUG_COUNTER_obj_str_embed,
12485RB_DEBUG_COUNTER_obj_str_shared,
12486RB_DEBUG_COUNTER_obj_str_nofree,
12487RB_DEBUG_COUNTER_obj_str_fstr,
12488RB_DEBUG_COUNTER_obj_ary_embed,
12489RB_DEBUG_COUNTER_obj_ary_transient,
12490RB_DEBUG_COUNTER_obj_ary_ptr,
12491RB_DEBUG_COUNTER_obj_ary_extracapa,
12492RB_DEBUG_COUNTER_obj_ary_shared_create,
12493RB_DEBUG_COUNTER_obj_ary_shared,
12494RB_DEBUG_COUNTER_obj_ary_shared_root_occupied,
12495RB_DEBUG_COUNTER_obj_hash_empty,
12496RB_DEBUG_COUNTER_obj_hash_1,
12497RB_DEBUG_COUNTER_obj_hash_2,
12498RB_DEBUG_COUNTER_obj_hash_3,
12499RB_DEBUG_COUNTER_obj_hash_4,
12500RB_DEBUG_COUNTER_obj_hash_5_8,
12501RB_DEBUG_COUNTER_obj_hash_g8,
12502RB_DEBUG_COUNTER_obj_hash_null,
12503RB_DEBUG_COUNTER_obj_hash_ar,
12504RB_DEBUG_COUNTER_obj_hash_st,
12505RB_DEBUG_COUNTER_obj_hash_transient,
12506RB_DEBUG_COUNTER_obj_hash_force_convert,
12507RB_DEBUG_COUNTER_obj_struct_embed,
12508RB_DEBUG_COUNTER_obj_struct_transient,
12509RB_DEBUG_COUNTER_obj_struct_ptr,
12510RB_DEBUG_COUNTER_obj_data_empty,
12511RB_DEBUG_COUNTER_obj_data_xfree,
12512RB_DEBUG_COUNTER_obj_data_imm_free,
12513RB_DEBUG_COUNTER_obj_data_zombie,
12514RB_DEBUG_COUNTER_obj_match_under4,
12515RB_DEBUG_COUNTER_obj_match_ge4,
12516RB_DEBUG_COUNTER_obj_match_ge8,
12517RB_DEBUG_COUNTER_obj_match_ptr,
12518RB_DEBUG_COUNTER_obj_iclass_ptr,
12519RB_DEBUG_COUNTER_obj_class_ptr,
12520RB_DEBUG_COUNTER_obj_module_ptr,
12521RB_DEBUG_COUNTER_obj_bignum_ptr,
12522RB_DEBUG_COUNTER_obj_bignum_embed,
12523RB_DEBUG_COUNTER_obj_float,
12524RB_DEBUG_COUNTER_obj_complex,
12525RB_DEBUG_COUNTER_obj_rational,
12526RB_DEBUG_COUNTER_obj_regexp_ptr,
12527RB_DEBUG_COUNTER_obj_file_ptr,
12528RB_DEBUG_COUNTER_obj_symbol,
12529RB_DEBUG_COUNTER_obj_imemo_ment,
12530RB_DEBUG_COUNTER_obj_imemo_iseq,
12531RB_DEBUG_COUNTER_obj_imemo_env,
12532RB_DEBUG_COUNTER_obj_imemo_tmpbuf,
12533RB_DEBUG_COUNTER_obj_imemo_ast,
12534RB_DEBUG_COUNTER_obj_imemo_cref,
12535RB_DEBUG_COUNTER_obj_imemo_svar,
12536RB_DEBUG_COUNTER_obj_imemo_throw_data,
12537RB_DEBUG_COUNTER_obj_imemo_ifunc,
12538RB_DEBUG_COUNTER_obj_imemo_memo,
12539RB_DEBUG_COUNTER_obj_imemo_parser_strterm,
12540RB_DEBUG_COUNTER_obj_imemo_callinfo,
12541RB_DEBUG_COUNTER_obj_imemo_callcache,
12542RB_DEBUG_COUNTER_obj_imemo_constcache,
12543RB_DEBUG_COUNTER_artable_hint_hit,
12544RB_DEBUG_COUNTER_artable_hint_miss,
12545RB_DEBUG_COUNTER_artable_hint_notfound,
12546RB_DEBUG_COUNTER_heap_xmalloc,
12547RB_DEBUG_COUNTER_heap_xrealloc,
12548RB_DEBUG_COUNTER_heap_xfree,
12549RB_DEBUG_COUNTER_theap_alloc,
12550RB_DEBUG_COUNTER_theap_alloc_fail,
12551RB_DEBUG_COUNTER_theap_evacuate,
12552RB_DEBUG_COUNTER_vm_sync_lock,
12553RB_DEBUG_COUNTER_vm_sync_lock_enter,
12554RB_DEBUG_COUNTER_vm_sync_lock_enter_nb,
12555RB_DEBUG_COUNTER_vm_sync_lock_enter_cr,
12556RB_DEBUG_COUNTER_vm_sync_barrier,
12557RB_DEBUG_COUNTER_mjit_exec,
12558RB_DEBUG_COUNTER_mjit_exec_not_added,
12559RB_DEBUG_COUNTER_mjit_exec_not_ready,
12560RB_DEBUG_COUNTER_mjit_exec_not_compiled,
12561RB_DEBUG_COUNTER_mjit_exec_call_func,
12562RB_DEBUG_COUNTER_mjit_add_iseq_to_process,
12563RB_DEBUG_COUNTER_mjit_unload_units,
12564RB_DEBUG_COUNTER_mjit_frame_VM2VM,
12565RB_DEBUG_COUNTER_mjit_frame_VM2JT,
12566RB_DEBUG_COUNTER_mjit_frame_JT2JT,
12567RB_DEBUG_COUNTER_mjit_frame_JT2VM,
12568RB_DEBUG_COUNTER_mjit_cancel,
12569RB_DEBUG_COUNTER_mjit_cancel_ivar_inline,
12570RB_DEBUG_COUNTER_mjit_cancel_exivar_inline,
12571RB_DEBUG_COUNTER_mjit_cancel_send_inline,
12572RB_DEBUG_COUNTER_mjit_cancel_opt_insn,
12573RB_DEBUG_COUNTER_mjit_cancel_invalidate_all,
12574RB_DEBUG_COUNTER_mjit_cancel_leave,
12575RB_DEBUG_COUNTER_mjit_length_unit_queue,
12576RB_DEBUG_COUNTER_mjit_length_active_units,
12577RB_DEBUG_COUNTER_mjit_length_compact_units,
12578RB_DEBUG_COUNTER_mjit_length_stale_units,
12579RB_DEBUG_COUNTER_mjit_compile_failures,
12580 RB_DEBUG_COUNTER_MAX
12581};
12582void rb_debug_counter_show_results(const char *msg);
12583
12584
12585size_t ruby_debug_counter_get(const char **names_ptr, size_t *counters_ptr);
12586void ruby_debug_counter_reset(void);
12587void ruby_debug_counter_show_at_exit(int enable);
12588
12589
12590static inline _Bool rb_yjit_enabled_p(void) { return 0; }
12591static inline unsigned rb_yjit_call_threshold(void) { return (0x7fffffff * 2U + 1U); }
12592static inline void rb_yjit_invalidate_all_method_lookup_assumptions(void) {}
12593static inline void rb_yjit_method_lookup_change(VALUE klass, ID mid) {}
12594static inline void rb_yjit_cme_invalidate(rb_callable_method_entry_t *cme) {}
12595static inline void rb_yjit_collect_vm_usage_insn(int insn) {}
12596static inline void rb_yjit_collect_binding_alloc(void) {}
12597static inline void rb_yjit_collect_binding_set(void) {}
12598static inline _Bool rb_yjit_compile_iseq(const rb_iseq_t *iseq, rb_execution_context_t *ec) { return 0; }
12599static inline void rb_yjit_init(void) {}
12600static inline void rb_yjit_bop_redefined(int redefined_flag, enum ruby_basic_operators bop) {}
12601static inline void rb_yjit_constant_state_changed(ID id) {}
12602static inline void rb_yjit_iseq_mark(void *payload) {}
12603static inline void rb_yjit_iseq_update_references(void *payload) {}
12604static inline void rb_yjit_iseq_free(void *payload) {}
12605static inline void rb_yjit_before_ractor_spawn(void) {}
12606static inline void rb_yjit_constant_ic_update(const rb_iseq_t *const iseq, IC ic) {}
12607static inline void rb_yjit_tracing_invalidate_all(void) {}
12608enum rb_mjit_iseq_func {
12609 NOT_ADDED_JIT_ISEQ_FUNC = 0,
12610 NOT_READY_JIT_ISEQ_FUNC = 1,
12611 NOT_COMPILED_JIT_ISEQ_FUNC = 2,
12612 LAST_JIT_ISEQ_FUNC = 3
12613};
12614struct mjit_options {
12615 char on;
12616 char save_temps;
12617 char warnings;
12618 char debug;
12619 char* debug_flags;
12620 unsigned int wait;
12621 unsigned int min_calls;
12622 int verbose;
12623 int max_cache_size;
12624};
12625struct rb_mjit_compile_info {
12626 _Bool disable_ivar_cache;
12627 _Bool disable_exivar_cache;
12628 _Bool disable_send_cache;
12629 _Bool disable_inlining;
12630 _Bool disable_const_cache;
12631};
12632typedef VALUE (*mjit_func_t)(rb_execution_context_t *, rb_control_frame_t *);
12633
12634
12635extern struct mjit_options mjit_opts;
12636extern _Bool mjit_call_p;
12637extern void rb_mjit_add_iseq_to_process(const rb_iseq_t *iseq);
12638extern VALUE rb_mjit_wait_call(rb_execution_context_t *ec, struct rb_iseq_constant_body *body);
12639extern struct rb_mjit_compile_info* rb_mjit_iseq_compile_info(const struct rb_iseq_constant_body *body);
12640extern void rb_mjit_recompile_send(const rb_iseq_t *iseq);
12641extern void rb_mjit_recompile_ivar(const rb_iseq_t *iseq);
12642extern void rb_mjit_recompile_exivar(const rb_iseq_t *iseq);
12643extern void rb_mjit_recompile_inlining(const rb_iseq_t *iseq);
12644extern void rb_mjit_recompile_const(const rb_iseq_t *iseq);
12645
12646
12647extern void mjit_cancel_all(const char *reason);
12648extern _Bool mjit_compile(FILE *f, const rb_iseq_t *iseq, const char *funcname, int id);
12649extern void mjit_init(const struct mjit_options *opts);
12650extern void mjit_gc_start_hook(void);
12651extern void mjit_gc_exit_hook(void);
12652extern void mjit_free_iseq(const rb_iseq_t *iseq);
12653extern void mjit_update_references(const rb_iseq_t *iseq);
12654extern void mjit_mark(void);
12655extern struct mjit_cont *mjit_cont_new(rb_execution_context_t *ec);
12656extern void mjit_cont_free(struct mjit_cont *cont);
12657extern void mjit_mark_cc_entries(const struct rb_iseq_constant_body *const body);
12658__attribute__((__noinline__)) static __attribute__((__cold__)) VALUE mjit_exec_slowpath(rb_execution_context_t *ec, const rb_iseq_t *iseq, struct rb_iseq_constant_body *body);
12659static VALUE
12660mjit_exec_slowpath(rb_execution_context_t *ec, const rb_iseq_t *iseq, struct rb_iseq_constant_body *body)
12661{
12662 uintptr_t func_i = (uintptr_t)(body->jit_func);
12663 ((__builtin_expect(!!(!!(func_i <= LAST_JIT_ISEQ_FUNC)), 1)) ? ((void)0) : __builtin_unreachable());
12664 switch ((enum rb_mjit_iseq_func)func_i) {
12665 case NOT_ADDED_JIT_ISEQ_FUNC:
12666 ((void)0);
12667 if (body->total_calls == mjit_opts.min_calls) {
12668 rb_mjit_add_iseq_to_process(iseq);
12669 if ((__builtin_expect(!!(mjit_opts.wait), 0))) {
12670 return rb_mjit_wait_call(ec, body);
12671 }
12672 }
12673 break;
12674 case NOT_READY_JIT_ISEQ_FUNC:
12675 ((void)0);
12676 break;
12677 case NOT_COMPILED_JIT_ISEQ_FUNC:
12678 ((void)0);
12679 break;
12680 default:
12681 break;
12682 }
12683 return ((VALUE)RUBY_Qundef);
12684}
12685static inline VALUE
12686mjit_exec(rb_execution_context_t *ec)
12687{
12688 const rb_iseq_t *iseq = ec->cfp->iseq;
12689 struct rb_iseq_constant_body *body = ((iseq)->body);
12690 _Bool yjit_enabled = 0;
12691 if (mjit_call_p || yjit_enabled) {
12692 body->total_calls++;
12693 }
12694 if (!(mjit_call_p || yjit_enabled))
12695 return ((VALUE)RUBY_Qundef);
12696 ((void)0);
12697 mjit_func_t func = body->jit_func;
12698 if (yjit_enabled && func == 0) {
12699 return ((VALUE)RUBY_Qundef);
12700 }
12701 if ((__builtin_expect(!!((uintptr_t)func <= LAST_JIT_ISEQ_FUNC), 0))) {
12702 ((void)0);
12703 return mjit_exec_slowpath(ec, iseq, body);
12704 }
12705 ((void)0);
12706 ((void)0);
12707 return func(ec, ec->cfp);
12708}
12709void mjit_child_after_fork(void);
12710VALUE mjit_pause(_Bool wait_p);
12711VALUE mjit_resume(void);
12712void mjit_finish(_Bool close_handle_p);
12713
12714
12715typedef struct rb_vm_struct ruby_vm_t;
12716int ruby_vm_destruct(ruby_vm_t *vm);
12717void ruby_vm_at_exit(void(*func)(ruby_vm_t *));
12718
12719
12720enum vm_call_flag_bits {
12721 VM_CALL_ARGS_SPLAT_bit,
12722 VM_CALL_ARGS_BLOCKARG_bit,
12723 VM_CALL_FCALL_bit,
12724 VM_CALL_VCALL_bit,
12725 VM_CALL_ARGS_SIMPLE_bit,
12726 VM_CALL_BLOCKISEQ_bit,
12727 VM_CALL_KWARG_bit,
12728 VM_CALL_KW_SPLAT_bit,
12729 VM_CALL_TAILCALL_bit,
12730 VM_CALL_SUPER_bit,
12731 VM_CALL_ZSUPER_bit,
12732 VM_CALL_OPT_SEND_bit,
12733 VM_CALL_KW_SPLAT_MUT_bit,
12734 VM_CALL__END
12735};
12736struct rb_callinfo_kwarg {
12737 int keyword_len;
12738 VALUE keywords[];
12739};
12740static inline size_t
12741rb_callinfo_kwarg_bytes(int keyword_len)
12742{
12743 return rb_size_mul_add_or_raise(
12744 keyword_len,
12745 sizeof(VALUE),
12746 sizeof(struct rb_callinfo_kwarg),
12747 rb_eRuntimeError);
12748}
12749struct rb_callinfo {
12750 VALUE flags;
12751 const struct rb_callinfo_kwarg *kwarg;
12752 VALUE mid;
12753 VALUE flag;
12754 VALUE argc;
12755};
12756static inline _Bool
12757vm_ci_packed_p(const struct rb_callinfo *ci)
12758{
12759 if ((__builtin_expect(!!(((VALUE)ci) & 0x01), 1))) {
12760 return 1;
12761 }
12762 else {
12763 ((void)0);
12764 return 0;
12765 }
12766}
12767static inline _Bool
12768vm_ci_p(const struct rb_callinfo *ci)
12769{
12770 if (vm_ci_packed_p(ci) || imemo_type_p((VALUE)ci, imemo_callinfo)) {
12771 return 1;
12772 }
12773 else {
12774 return 0;
12775 }
12776}
12777static inline ID
12778vm_ci_mid(const struct rb_callinfo *ci)
12779{
12780 if (vm_ci_packed_p(ci)) {
12781 return (((VALUE)ci) >> (1 + 15 + 16)) & ((((VALUE)1)<<32) - 1);
12782 }
12783 else {
12784 return (ID)ci->mid;
12785 }
12786}
12787static inline unsigned int
12788vm_ci_flag(const struct rb_callinfo *ci)
12789{
12790 if (vm_ci_packed_p(ci)) {
12791 return (unsigned int)((((VALUE)ci) >> (1 + 15)) & ((((VALUE)1)<<16) - 1));
12792 }
12793 else {
12794 return (unsigned int)ci->flag;
12795 }
12796}
12797static inline unsigned int
12798vm_ci_argc(const struct rb_callinfo *ci)
12799{
12800 if (vm_ci_packed_p(ci)) {
12801 return (unsigned int)((((VALUE)ci) >> (1)) & ((((VALUE)1)<<15) - 1));
12802 }
12803 else {
12804 return (unsigned int)ci->argc;
12805 }
12806}
12807static inline const struct rb_callinfo_kwarg *
12808vm_ci_kwarg(const struct rb_callinfo *ci)
12809{
12810 if (vm_ci_packed_p(ci)) {
12811 return ((void *)0);
12812 }
12813 else {
12814 return ci->kwarg;
12815 }
12816}
12817static inline void
12818vm_ci_dump(const struct rb_callinfo *ci)
12819{
12820 if (vm_ci_packed_p(ci)) {
12821 ruby_debug_printf("packed_ci ID:%s flag:%x argc:%u\n",
12822 rb_id2name(vm_ci_mid(ci)), vm_ci_flag(ci), vm_ci_argc(ci));
12823 }
12824 else {
12825 rb_obj_info_dump_loc((VALUE)(ci), "./vm_callinfo.h", 175, __func__);
12826 }
12827}
12828static inline const struct rb_callinfo *
12829vm_ci_new_(ID mid, unsigned int flag, unsigned int argc, const struct rb_callinfo_kwarg *kwarg, const char *file, int line)
12830{
12831 if ((((mid ) & ~((((VALUE)1)<<32) - 1)) ? 0 : ((flag) & ~((((VALUE)1)<<16) - 1)) ? 0 : ((argc) & ~((((VALUE)1)<<15) - 1)) ? 0 : (kwarg) ? 0 : 1)) {
12832 ((void)0);
12833 return ((const struct rb_callinfo *) ((((VALUE)(mid )) << (1 + 15 + 16)) | (((VALUE)(flag)) << (1 + 15)) | (((VALUE)(argc)) << (1)) | RUBY_FIXNUM_FLAG));
12834 }
12835 const _Bool debug = 0;
12836 if (debug) ruby_debug_printf("%s:%d ", file, line);
12837 const struct rb_callinfo *ci = (const struct rb_callinfo *)
12838 rb_imemo_new(imemo_callinfo,
12839 (VALUE)mid,
12840 (VALUE)flag,
12841 (VALUE)argc,
12842 (VALUE)kwarg);
12843 if (debug) rb_obj_info_dump_loc((VALUE)(ci), "./vm_callinfo.h", 216, __func__);
12844 if (kwarg) {
12845 ((void)0);
12846 }
12847 else {
12848 ((void)0);
12849 }
12850 ((void)0);
12851 ((void)0);
12852 return ci;
12853}
12854static inline const struct rb_callinfo *
12855vm_ci_new_runtime_(ID mid, unsigned int flag, unsigned int argc, const struct rb_callinfo_kwarg *kwarg, const char *file, int line)
12856{
12857 ((void)0);
12858 return vm_ci_new_(mid, flag, argc, kwarg, file, line);
12859}
12860static inline _Bool
12861vm_ci_markable(const struct rb_callinfo *ci)
12862{
12863 if (! ci) {
12864 return 0;
12865 }
12866 else if (vm_ci_packed_p(ci)) {
12867 return 1;
12868 }
12869 else {
12870 ((void)0);
12871 return ! RB_FL_ANY_RAW((VALUE)ci, ((VALUE)RUBY_FL_USER4));
12872 }
12873}
12874typedef VALUE (*vm_call_handler)(
12875 struct rb_execution_context_struct *ec,
12876 struct rb_control_frame_struct *cfp,
12877 struct rb_calling_info *calling);
12878struct rb_callcache {
12879 const VALUE flags;
12880 const VALUE klass;
12881 const struct rb_callable_method_entry_struct * const cme_;
12882 const vm_call_handler call_;
12883 union {
12884 const unsigned int attr_index;
12885 const enum method_missing_reason method_missing_reason;
12886 VALUE v;
12887 } aux_;
12888};
12889static inline const struct rb_callcache *
12890vm_cc_new(VALUE klass,
12891 const struct rb_callable_method_entry_struct *cme,
12892 vm_call_handler call)
12893{
12894 const struct rb_callcache *cc = (const struct rb_callcache *)rb_imemo_new(imemo_callcache, (VALUE)cme, (VALUE)call, 0, klass);
12895 ((void)0);
12896 return cc;
12897}
12898static inline _Bool
12899vm_cc_class_check(const struct rb_callcache *cc, VALUE klass)
12900{
12901 ((void)0);
12902 ((void)0);
12903 return cc->klass == klass;
12904}
12905static inline int
12906vm_cc_markable(const struct rb_callcache *cc)
12907{
12908 ((void)0);
12909 return RB_FL_TEST_RAW((VALUE)cc, ((VALUE)RUBY_FL_USER4)) == 0;
12910}
12911static inline const struct rb_callable_method_entry_struct *
12912vm_cc_cme(const struct rb_callcache *cc)
12913{
12914 ((void)0);
12915 ((void)0);
12916 return cc->cme_;
12917}
12918static inline vm_call_handler
12919vm_cc_call(const struct rb_callcache *cc)
12920{
12921 ((void)0);
12922 ((void)0);
12923 return cc->call_;
12924}
12925static inline unsigned int
12926vm_cc_attr_index(const struct rb_callcache *cc)
12927{
12928 ((void)0);
12929 return cc->aux_.attr_index - 1;
12930}
12931static inline _Bool
12932vm_cc_attr_index_p(const struct rb_callcache *cc)
12933{
12934 ((void)0);
12935 return cc->aux_.attr_index > 0;
12936}
12937static inline unsigned int
12938vm_cc_cmethod_missing_reason(const struct rb_callcache *cc)
12939{
12940 ((void)0);
12941 return cc->aux_.method_missing_reason;
12942}
12943static inline _Bool
12944vm_cc_invalidated_p(const struct rb_callcache *cc)
12945{
12946 if (cc->klass && !((vm_cc_cme(cc))->flags & ((VALUE)RUBY_FL_USER9))) {
12947 return 0;
12948 }
12949 else {
12950 return 1;
12951 }
12952}
12953static inline _Bool
12954vm_cc_valid_p(const struct rb_callcache *cc, const rb_callable_method_entry_t *cc_cme, VALUE klass)
12955{
12956 ((void)0);
12957 if (cc->klass == klass && !((cc_cme)->flags & ((VALUE)RUBY_FL_USER9))) {
12958 return 1;
12959 }
12960 else {
12961 return 0;
12962 }
12963}
12964extern const struct rb_callcache *rb_vm_empty_cc(void);
12965extern const struct rb_callcache *rb_vm_empty_cc_for_super(void);
12966static inline void
12967vm_cc_call_set(const struct rb_callcache *cc, vm_call_handler call)
12968{
12969 ((void)0);
12970 ((void)0);
12971 *(vm_call_handler *)&cc->call_ = call;
12972}
12973static inline void
12974vm_cc_attr_index_set(const struct rb_callcache *cc, int index)
12975{
12976 ((void)0);
12977 ((void)0);
12978 *(int *)&cc->aux_.attr_index = index + 1;
12979}
12980static inline void
12981vm_cc_attr_index_initialize(const struct rb_callcache *cc)
12982{
12983 ((void)0);
12984 ((void)0);
12985 *(int *)&cc->aux_.attr_index = 0;
12986}
12987static inline void
12988vm_cc_method_missing_reason_set(const struct rb_callcache *cc, enum method_missing_reason reason)
12989{
12990 ((void)0);
12991 ((void)0);
12992 *(enum method_missing_reason *)&cc->aux_.method_missing_reason = reason;
12993}
12994static inline void
12995vm_cc_invalidate(const struct rb_callcache *cc)
12996{
12997 ((void)0);
12998 ((void)0);
12999 ((void)0);
13000 *(VALUE *)&cc->klass = 0;
13001 ((void)0);
13002}
13003struct rb_call_data {
13004 const struct rb_callinfo *ci;
13005 const struct rb_callcache *cc;
13006};
13007struct rb_class_cc_entries {
13008 int capa;
13009 int len;
13010 const struct rb_callable_method_entry_struct *cme;
13011 struct rb_class_cc_entries_entry {
13012 const struct rb_callinfo *ci;
13013 const struct rb_callcache *cc;
13014 } *entries;
13015};
13016void rb_vm_ccs_free(struct rb_class_cc_entries *ccs);
13017
13018
13019struct RNode;
13020VALUE ruby_debug_print_value(int level, int debug_level, const char *header, VALUE v);
13021ID ruby_debug_print_id(int level, int debug_level, const char *header, ID id);
13022struct RNode *ruby_debug_print_node(int level, int debug_level, const char *header, const struct RNode *node);
13023int ruby_debug_print_indent(int level, int debug_level, int indent_level);
13024void ruby_debug_gc_check_func(void);
13025void ruby_set_debug_option(const char *str);
13026
13027
13028extern enum ruby_debug_log_mode {
13029 ruby_debug_log_disabled = 0x00,
13030 ruby_debug_log_memory = 0x01,
13031 ruby_debug_log_stderr = 0x02,
13032 ruby_debug_log_file = 0x04,
13033} ruby_debug_log_mode;
13034__attribute__((__format__(__printf__, 4, 5)))
13035void ruby_debug_log(const char *file, int line, const char *func_name, const char *fmt, ...);
13036void ruby_debug_log_print(unsigned int n);
13037_Bool ruby_debug_log_filter(const char *func_name, const char *file_name);
13038typedef long OFFSET;
13039typedef unsigned long lindex_t;
13040typedef VALUE GENTRY;
13041typedef rb_iseq_t *ISEQ;
13042
13043
13044extern VALUE ruby_vm_const_missing_count;
13045extern rb_serial_t ruby_vm_constant_cache_invalidations;
13046extern rb_serial_t ruby_vm_constant_cache_misses;
13047extern rb_serial_t ruby_vm_class_serial;
13048extern rb_serial_t ruby_vm_global_cvar_state;
13049
13050
13051static inline void
13052CC_SET_FASTPATH(const struct rb_callcache *cc, vm_call_handler func, _Bool enabled)
13053{
13054 if ((__builtin_expect(!!(enabled), 1))) {
13055 vm_cc_call_set(cc, func);
13056 }
13057}
13058static inline struct vm_throw_data *
13059THROW_DATA_NEW(VALUE val, const rb_control_frame_t *cf, int st)
13060{
13061 struct vm_throw_data *obj = (struct vm_throw_data *)rb_imemo_new(imemo_throw_data, val, (VALUE)cf, 0, 0);
13062 obj->throw_state = st;
13063 return obj;
13064}
13065static inline VALUE
13066THROW_DATA_VAL(const struct vm_throw_data *obj)
13067{
13068 ((void)0);
13069 return obj->throw_obj;
13070}
13071static inline const rb_control_frame_t *
13072THROW_DATA_CATCH_FRAME(const struct vm_throw_data *obj)
13073{
13074 ((void)0);
13075 return obj->catch_frame;
13076}
13077static inline int
13078THROW_DATA_STATE(const struct vm_throw_data *obj)
13079{
13080 ((void)0);
13081 return obj->throw_state;
13082}
13083static inline int
13084THROW_DATA_CONSUMED_P(const struct vm_throw_data *obj)
13085{
13086 ((void)0);
13087 return obj->flags & ((VALUE)RUBY_FL_USER4);
13088}
13089static inline void
13090THROW_DATA_CATCH_FRAME_SET(struct vm_throw_data *obj, const rb_control_frame_t *cfp)
13091{
13092 ((void)0);
13093 obj->catch_frame = cfp;
13094}
13095static inline void
13096THROW_DATA_STATE_SET(struct vm_throw_data *obj, int st)
13097{
13098 ((void)0);
13099 obj->throw_state = st;
13100}
13101static inline void
13102THROW_DATA_CONSUMED_SET(struct vm_throw_data *obj)
13103{
13104 if (imemo_throw_data_p((VALUE)obj) &&
13105 THROW_DATA_STATE(obj) == RUBY_TAG_BREAK) {
13106 obj->flags |= ((VALUE)RUBY_FL_USER4);
13107 }
13108}
13109static inline _Bool
13110vm_call_iseq_optimizable_p(const struct rb_callinfo *ci, const struct rb_callcache *cc)
13111{
13112 return !(vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit)) && !(vm_ci_flag(ci) & (0x01 << VM_CALL_KWARG_bit)) &&
13113 !((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED);
13114}
13115struct rb_ractor_local_storage_type {
13116 void (*mark)(void *ptr);
13117 void (*free)(void *ptr);
13118};
13119typedef struct rb_ractor_local_key_struct *rb_ractor_local_key_t;
13120
13121
13122extern VALUE rb_cRactor;
13123VALUE rb_ractor_stdin(void);
13124VALUE rb_ractor_stdout(void);
13125VALUE rb_ractor_stderr(void);
13126void rb_ractor_stdin_set(VALUE io);
13127void rb_ractor_stdout_set(VALUE io);
13128void rb_ractor_stderr_set(VALUE io);
13129rb_ractor_local_key_t rb_ractor_local_storage_value_newkey(void);
13130VALUE rb_ractor_local_storage_value(rb_ractor_local_key_t key);
13131_Bool rb_ractor_local_storage_value_lookup(rb_ractor_local_key_t key, VALUE *val);
13132void rb_ractor_local_storage_value_set(rb_ractor_local_key_t key, VALUE val);
13133extern const struct rb_ractor_local_storage_type rb_ractor_local_storage_type_free;
13134rb_ractor_local_key_t rb_ractor_local_storage_ptr_newkey(const struct rb_ractor_local_storage_type *type);
13135void *rb_ractor_local_storage_ptr(rb_ractor_local_key_t key);
13136void rb_ractor_local_storage_ptr_set(rb_ractor_local_key_t key, void *ptr);
13137VALUE rb_ractor_make_shareable(VALUE obj);
13138VALUE rb_ractor_make_shareable_copy(VALUE obj);
13139
13140
13141static inline _Bool
13142rb_ractor_shareable_p(VALUE obj)
13143{
13144 _Bool rb_ractor_shareable_p_continue(VALUE obj);
13145 if (RB_SPECIAL_CONST_P(obj)) {
13146 return 1;
13147 }
13148 else if (RB_FL_TEST_RAW((obj), RUBY_FL_SHAREABLE)) {
13149 return 1;
13150 }
13151 else {
13152 return rb_ractor_shareable_p_continue(obj);
13153 }
13154}
13155enum rb_ractor_basket_type {
13156 basket_type_none,
13157 basket_type_ref,
13158 basket_type_copy,
13159 basket_type_move,
13160 basket_type_will,
13161 basket_type_deleted,
13162 basket_type_reserved,
13163};
13164struct rb_ractor_basket {
13165 _Bool exception;
13166 enum rb_ractor_basket_type type;
13167 VALUE v;
13168 VALUE sender;
13169};
13170struct rb_ractor_queue {
13171 struct rb_ractor_basket *baskets;
13172 int start;
13173 int cnt;
13174 int size;
13175 unsigned int serial;
13176 unsigned int reserved_cnt;
13177};
13178struct rb_ractor_waiting_list {
13179 int cnt;
13180 int size;
13181 rb_ractor_t **ractors;
13182};
13183struct rb_ractor_sync {
13184 rb_nativethread_lock_t lock;
13185 rb_nativethread_cond_t cond;
13186 struct rb_ractor_queue incoming_queue;
13187 struct rb_ractor_waiting_list taking_ractors;
13188 _Bool incoming_port_closed;
13189 _Bool outgoing_port_closed;
13190 struct ractor_wait {
13191 enum ractor_wait_status {
13192 wait_none = 0x00,
13193 wait_receiving = 0x01,
13194 wait_taking = 0x02,
13195 wait_yielding = 0x04,
13196 wait_moving = 0x08,
13197 } status;
13198 enum ractor_wakeup_status {
13199 wakeup_none,
13200 wakeup_by_send,
13201 wakeup_by_yield,
13202 wakeup_by_take,
13203 wakeup_by_close,
13204 wakeup_by_interrupt,
13205 wakeup_by_retry,
13206 } wakeup_status;
13207 struct rb_ractor_basket yielded_basket;
13208 struct rb_ractor_basket taken_basket;
13209 } wait;
13210};
13211struct rb_ractor_struct {
13212 struct rb_ractor_pub pub;
13213 struct rb_ractor_sync sync;
13214 VALUE receiving_mutex;
13215 _Bool yield_atexit;
13216 rb_nativethread_cond_t barrier_wait_cond;
13217 struct {
13218 struct ccan_list_head set;
13219 unsigned int cnt;
13220 unsigned int blocking_cnt;
13221 unsigned int sleeper;
13222 struct rb_thread_sched sched;
13223 rb_execution_context_t *running_ec;
13224 rb_thread_t *main;
13225 } threads;
13226 VALUE thgroup_default;
13227 VALUE name;
13228 VALUE loc;
13229 enum ractor_status {
13230 ractor_created,
13231 ractor_running,
13232 ractor_blocking,
13233 ractor_terminated,
13234 } status_;
13235 struct ccan_list_node vmlr_node;
13236 st_table *local_storage;
13237 struct rb_id_table *idkey_local_storage;
13238 VALUE r_stdin;
13239 VALUE r_stdout;
13240 VALUE r_stderr;
13241 VALUE verbose;
13242 VALUE debug;
13243 rb_ractor_newobj_cache_t newobj_cache;
13244 struct gc_mark_func_data_struct {
13245 void *data;
13246 void (*mark_func)(VALUE v, void *data);
13247 } *mfd;
13248};
13249static inline VALUE
13250rb_ractor_self(const rb_ractor_t *r)
13251{
13252 return r->pub.self;
13253}
13254rb_ractor_t *rb_ractor_main_alloc(void);
13255void rb_ractor_main_setup(rb_vm_t *vm, rb_ractor_t *main_ractor, rb_thread_t *main_thread);
13256void rb_ractor_atexit(rb_execution_context_t *ec, VALUE result);
13257void rb_ractor_atexit_exception(rb_execution_context_t *ec);
13258void rb_ractor_teardown(rb_execution_context_t *ec);
13259void rb_ractor_receive_parameters(rb_execution_context_t *ec, rb_ractor_t *g, int len, VALUE *ptr);
13260void rb_ractor_send_parameters(rb_execution_context_t *ec, rb_ractor_t *g, VALUE args);
13261VALUE rb_thread_create_ractor(rb_ractor_t *g, VALUE args, VALUE proc);
13262int rb_ractor_living_thread_num(const rb_ractor_t *);
13263VALUE rb_ractor_thread_list(rb_ractor_t *r);
13264_Bool rb_ractor_p(VALUE rv);
13265void rb_ractor_living_threads_init(rb_ractor_t *r);
13266void rb_ractor_living_threads_insert(rb_ractor_t *r, rb_thread_t *th);
13267void rb_ractor_living_threads_remove(rb_ractor_t *r, rb_thread_t *th);
13268void rb_ractor_blocking_threads_inc(rb_ractor_t *r, const char *file, int line);
13269void rb_ractor_blocking_threads_dec(rb_ractor_t *r, const char *file, int line);
13270void rb_ractor_vm_barrier_interrupt_running_thread(rb_ractor_t *r);
13271void rb_ractor_terminate_interrupt_main_thread(rb_ractor_t *r);
13272void rb_ractor_terminate_all(void);
13273_Bool rb_ractor_main_p_(void);
13274void rb_ractor_finish_marking(void);
13275void rb_ractor_atfork(rb_vm_t *vm, rb_thread_t *th);
13276VALUE rb_ractor_ensure_shareable(VALUE obj, VALUE name);
13277
13278
13279_Bool rb_ractor_shareable_p_continue(VALUE obj);
13280void rb_ractor_local_storage_delkey(rb_ractor_local_key_t key);
13281
13282
13283static inline _Bool
13284rb_ractor_main_p(void)
13285{
13286 if (ruby_single_main_ractor) {
13287 return 1;
13288 }
13289 else {
13290 return rb_ractor_main_p_();
13291 }
13292}
13293static inline _Bool
13294rb_ractor_status_p(rb_ractor_t *r, enum ractor_status status)
13295{
13296 return r->status_ == status;
13297}
13298static inline void
13299rb_ractor_sleeper_threads_inc(rb_ractor_t *r)
13300{
13301 r->threads.sleeper++;
13302}
13303static inline void
13304rb_ractor_sleeper_threads_dec(rb_ractor_t *r)
13305{
13306 r->threads.sleeper--;
13307}
13308static inline void
13309rb_ractor_sleeper_threads_clear(rb_ractor_t *r)
13310{
13311 r->threads.sleeper = 0;
13312}
13313static inline int
13314rb_ractor_sleeper_thread_num(rb_ractor_t *r)
13315{
13316 return r->threads.sleeper;
13317}
13318static inline void
13319rb_ractor_thread_switch(rb_ractor_t *cr, rb_thread_t *th)
13320{
13321 if (cr->threads.running_ec != th->ec) {
13322 if (0) {
13323 ruby_debug_printf("rb_ractor_thread_switch ec:%p->%p\n",
13324 (void *)cr->threads.running_ec, (void *)th->ec);
13325 }
13326 }
13327 else {
13328 return;
13329 }
13330 if (cr->threads.running_ec != th->ec) {
13331 th->running_time_us = 0;
13332 }
13333 cr->threads.running_ec = th->ec;
13334 ((void)0);
13335}
13336static inline void
13337rb_ractor_set_current_ec_(rb_ractor_t *cr, rb_execution_context_t *ec, const char *file, int line)
13338{
13339 ruby_current_ec = ec;
13340 ;
13341 ((void)0);
13342 cr->threads.running_ec = ec;
13343}
13344void rb_vm_ractor_blocking_cnt_inc(rb_vm_t *vm, rb_ractor_t *cr, const char *file, int line);
13345void rb_vm_ractor_blocking_cnt_dec(rb_vm_t *vm, rb_ractor_t *cr, const char *file, int line);
13346static inline uint32_t
13347rb_ractor_id(const rb_ractor_t *r)
13348{
13349 return r->pub.id;
13350}
13351_Bool rb_vm_locked_p(void);
13352void rb_vm_lock_body(void);
13353void rb_vm_unlock_body(void);
13354struct rb_ractor_struct;
13355void rb_vm_lock_enter_body_cr(struct rb_ractor_struct *cr, unsigned int *lev );
13356void rb_vm_lock_enter_body_nb(unsigned int *lev );
13357void rb_vm_lock_enter_body(unsigned int *lev );
13358void rb_vm_lock_leave_body(unsigned int *lev );
13359void rb_vm_barrier(void);
13360extern struct rb_ractor_struct *ruby_single_main_ractor;
13361static inline _Bool
13362rb_multi_ractor_p(void)
13363{
13364 if ((__builtin_expect(!!(ruby_single_main_ractor), 1))) {
13365 ((void)0);
13366 return 0;
13367 }
13368 else {
13369 return 1;
13370 }
13371}
13372static inline void
13373rb_vm_lock(const char *file, int line)
13374{
13375 ((void)0);
13376 if (rb_multi_ractor_p()) {
13377 rb_vm_lock_body();
13378 }
13379}
13380static inline void
13381rb_vm_unlock(const char *file, int line)
13382{
13383 if (rb_multi_ractor_p()) {
13384 rb_vm_unlock_body();
13385 }
13386}
13387static inline void
13388rb_vm_lock_enter(unsigned int *lev, const char *file, int line)
13389{
13390 ((void)0);
13391 if (rb_multi_ractor_p()) {
13392 rb_vm_lock_enter_body(lev );
13393 }
13394}
13395static inline void
13396rb_vm_lock_enter_nb(unsigned int *lev, const char *file, int line)
13397{
13398 ((void)0);
13399 if (rb_multi_ractor_p()) {
13400 rb_vm_lock_enter_body_nb(lev );
13401 }
13402}
13403static inline void
13404rb_vm_lock_leave(unsigned int *lev, const char *file, int line)
13405{
13406 if (rb_multi_ractor_p()) {
13407 rb_vm_lock_leave_body(lev );
13408 }
13409}
13410static inline void
13411rb_vm_lock_enter_cr(struct rb_ractor_struct *cr, unsigned int *levp, const char *file, int line)
13412{
13413 ((void)0);
13414 rb_vm_lock_enter_body_cr(cr, levp );
13415}
13416static inline void
13417rb_vm_lock_leave_cr(struct rb_ractor_struct *cr, unsigned int *levp, const char *file, int line)
13418{
13419 rb_vm_lock_leave_body(levp );
13420}
13421struct rb_builtin_function {
13422 const void * const func_ptr;
13423 const int argc;
13424 const int index;
13425 const char * const name;
13426 void (*compiler)(FILE *, long, unsigned, _Bool);
13427};
13428void rb_load_with_builtin_functions(const char *feature_name, const struct rb_builtin_function *table);
13429typedef VALUE (*rb_builtin_arity0_function_type)(rb_execution_context_t *ec, VALUE self);
13430typedef VALUE (*rb_builtin_arity1_function_type)(rb_execution_context_t *ec, VALUE self,
13431 VALUE);
13432typedef VALUE (*rb_builtin_arity2_function_type)(rb_execution_context_t *ec, VALUE self,
13433 VALUE, VALUE);
13434typedef VALUE (*rb_builtin_arity3_function_type)(rb_execution_context_t *ec, VALUE self,
13435 VALUE, VALUE, VALUE);
13436typedef VALUE (*rb_builtin_arity4_function_type)(rb_execution_context_t *ec, VALUE self,
13437 VALUE, VALUE, VALUE, VALUE);
13438typedef VALUE (*rb_builtin_arity5_function_type)(rb_execution_context_t *ec, VALUE self,
13439 VALUE, VALUE, VALUE, VALUE, VALUE);
13440typedef VALUE (*rb_builtin_arity6_function_type)(rb_execution_context_t *ec, VALUE self,
13441 VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
13442typedef VALUE (*rb_builtin_arity7_function_type)(rb_execution_context_t *ec, VALUE self,
13443 VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
13444typedef VALUE (*rb_builtin_arity8_function_type)(rb_execution_context_t *ec, VALUE self,
13445 VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
13446typedef VALUE (*rb_builtin_arity9_function_type)(rb_execution_context_t *ec, VALUE self,
13447 VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
13448typedef VALUE (*rb_builtin_arity10_function_type)(rb_execution_context_t *ec, VALUE self,
13449 VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
13450typedef VALUE (*rb_builtin_arity11_function_type)(rb_execution_context_t *ec, VALUE self,
13451 VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
13452typedef VALUE (*rb_builtin_arity12_function_type)(rb_execution_context_t *ec, VALUE self,
13453 VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
13454typedef VALUE (*rb_builtin_arity13_function_type)(rb_execution_context_t *ec, VALUE self,
13455 VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
13456typedef VALUE (*rb_builtin_arity14_function_type)(rb_execution_context_t *ec, VALUE self,
13457 VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
13458typedef VALUE (*rb_builtin_arity15_function_type)(rb_execution_context_t *ec, VALUE self,
13459 VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
13460static inline void rb_builtin_function_check_arity0(rb_builtin_arity0_function_type f){}
13461static inline void rb_builtin_function_check_arity1(rb_builtin_arity1_function_type f){}
13462static inline void rb_builtin_function_check_arity2(rb_builtin_arity2_function_type f){}
13463static inline void rb_builtin_function_check_arity3(rb_builtin_arity3_function_type f){}
13464static inline void rb_builtin_function_check_arity4(rb_builtin_arity4_function_type f){}
13465static inline void rb_builtin_function_check_arity5(rb_builtin_arity5_function_type f){}
13466static inline void rb_builtin_function_check_arity6(rb_builtin_arity6_function_type f){}
13467static inline void rb_builtin_function_check_arity7(rb_builtin_arity7_function_type f){}
13468static inline void rb_builtin_function_check_arity8(rb_builtin_arity8_function_type f){}
13469static inline void rb_builtin_function_check_arity9(rb_builtin_arity9_function_type f){}
13470static inline void rb_builtin_function_check_arity10(rb_builtin_arity10_function_type f){}
13471static inline void rb_builtin_function_check_arity11(rb_builtin_arity11_function_type f){}
13472static inline void rb_builtin_function_check_arity12(rb_builtin_arity12_function_type f){}
13473static inline void rb_builtin_function_check_arity13(rb_builtin_arity13_function_type f){}
13474static inline void rb_builtin_function_check_arity14(rb_builtin_arity14_function_type f){}
13475static inline void rb_builtin_function_check_arity15(rb_builtin_arity15_function_type f){}static inline
13476__attribute__((__pure__)) VALUE rb_vm_lvar_exposed(rb_execution_context_t *ec, int index);static inline
13477VALUE rb_vm_lvar_exposed(rb_execution_context_t *ec, int index);
13478__attribute__((__pure__)) static inline VALUE rb_vm_lvar(rb_execution_context_t *ec, int index);
13479static inline VALUE
13480rb_vm_lvar(rb_execution_context_t *ec, int index)
13481{
13482 return ec->cfp->ep[index];
13483}
13484struct builtin_binary {
13485 const char *feature;
13486 const unsigned char *bin;
13487 size_t bin_size;
13488};
13489struct ruby_dtrace_method_hook_args {
13490 const char *classname;
13491 const char *methodname;
13492 const char *filename;
13493 int line_no;
13494 volatile VALUE klass;
13495 volatile VALUE name;
13496};
13497
13498
13499__attribute__((__noinline__)) int rb_dtrace_setup(rb_execution_context_t *, VALUE, ID, struct ruby_dtrace_method_hook_args *);
13500
13501
13502VALUE rb_str_concat_literals(size_t, const VALUE*);
13503__attribute__ ((__visibility__("default"))) extern
13504VALUE rb_vm_exec(rb_execution_context_t *, _Bool);
13505__attribute__((__pure__)) static inline const VALUE *VM_EP_LEP(const VALUE *);
13506static inline const VALUE *
13507VM_EP_LEP(const VALUE *ep)
13508{
13509 while (!VM_ENV_LOCAL_P(ep)) {
13510 ep = VM_ENV_PREV_EP(ep);
13511 }
13512 return ep;
13513}
13514static inline const rb_control_frame_t *
13515rb_vm_search_cf_from_ep(const rb_execution_context_t *ec, const rb_control_frame_t *cfp, const VALUE * const ep)
13516{
13517 if (!ep) {
13518 return ((void *)0);
13519 }
13520 else {
13521 const rb_control_frame_t * const eocfp = RUBY_VM_END_CONTROL_FRAME(ec);
13522 while (cfp < eocfp) {
13523 if (cfp->ep == ep) {
13524 return cfp;
13525 }
13526 cfp = ((cfp)+1);
13527 }
13528 return ((void *)0);
13529 }
13530}static inline
13531const VALUE *
13532rb_vm_ep_local_ep(const VALUE *ep)
13533{
13534 return VM_EP_LEP(ep);
13535}
13536__attribute__((__pure__)) static inline const VALUE *VM_CF_LEP(const rb_control_frame_t * const cfp);
13537static inline const VALUE *
13538VM_CF_LEP(const rb_control_frame_t * const cfp)
13539{
13540 return VM_EP_LEP(cfp->ep);
13541}
13542static inline const VALUE *
13543VM_CF_PREV_EP(const rb_control_frame_t * const cfp)
13544{
13545 return VM_ENV_PREV_EP(cfp->ep);
13546}
13547__attribute__((__pure__)) static inline VALUE VM_CF_BLOCK_HANDLER(const rb_control_frame_t * const cfp);
13548static inline VALUE
13549VM_CF_BLOCK_HANDLER(const rb_control_frame_t * const cfp)
13550{
13551 const VALUE *ep = VM_CF_LEP(cfp);
13552 return VM_ENV_BLOCK_HANDLER(ep);
13553}static inline
13554int
13555rb_vm_cframe_keyword_p(const rb_control_frame_t *cfp)
13556{
13557 return VM_FRAME_CFRAME_KW_P(cfp);
13558}static inline
13559VALUE
13560rb_vm_frame_block_handler(const rb_control_frame_t *cfp)
13561{
13562 return VM_CF_BLOCK_HANDLER(cfp);
13563}
13564static struct rb_captured_block *
13565VM_CFP_TO_CAPTURED_BLOCK(const rb_control_frame_t *cfp)
13566{
13567 ((void)0);
13568 return (struct rb_captured_block *)&cfp->self;
13569}
13570static rb_control_frame_t *
13571VM_CAPTURED_BLOCK_TO_CFP(const struct rb_captured_block *captured)
13572{
13573 rb_control_frame_t *cfp = ((rb_control_frame_t *)((VALUE *)(captured) - 3));
13574 ((void)0);
13575 ((void)0);
13576 return cfp;
13577}
13578static int
13579VM_BH_FROM_CFP_P(VALUE block_handler, const rb_control_frame_t *cfp)
13580{
13581 const struct rb_captured_block *captured = VM_CFP_TO_CAPTURED_BLOCK(cfp);
13582 return ((void *)((block_handler) & ~0x03)) == captured;
13583}
13584static VALUE
13585vm_passed_block_handler(rb_execution_context_t *ec)
13586{
13587 VALUE block_handler = ec->passed_block_handler;
13588 ec->passed_block_handler = 0;
13589 vm_block_handler_verify(block_handler);
13590 return block_handler;
13591}
13592static rb_cref_t *
13593vm_cref_new0(VALUE klass, rb_method_visibility_t visi, int module_func, rb_cref_t *prev_cref, int pushed_by_eval, int use_prev_prev, int singleton)
13594{
13595 VALUE refinements = ((VALUE)RUBY_Qnil);
13596 int omod_shared = 0;
13597 rb_cref_t *cref;
13598 union {
13599 rb_scope_visibility_t visi;
13600 VALUE value;
13601 } scope_visi;
13602 scope_visi.visi.method_visi = visi;
13603 scope_visi.visi.module_func = module_func;
13604 if (prev_cref != ((void *)0) && prev_cref != (void *)1 ) {
13605 refinements = CREF_REFINEMENTS(prev_cref);
13606 if (!RB_NIL_P(refinements)) {
13607 omod_shared = 1;
13608 CREF_OMOD_SHARED_SET(prev_cref);
13609 }
13610 }
13611 ((void)0);
13612 cref = (rb_cref_t *)rb_imemo_new(imemo_cref, klass, (VALUE)(use_prev_prev ? CREF_NEXT(prev_cref) : prev_cref), scope_visi.value, refinements);
13613 if (pushed_by_eval) CREF_PUSHED_BY_EVAL_SET(cref);
13614 if (omod_shared) CREF_OMOD_SHARED_SET(cref);
13615 if (singleton) CREF_SINGLETON_SET(cref);
13616 return cref;
13617}
13618static rb_cref_t *
13619vm_cref_new(VALUE klass, rb_method_visibility_t visi, int module_func, rb_cref_t *prev_cref, int pushed_by_eval, int singleton)
13620{
13621 return vm_cref_new0(klass, visi, module_func, prev_cref, pushed_by_eval, 0, singleton);
13622}
13623static rb_cref_t *
13624vm_cref_new_use_prev(VALUE klass, rb_method_visibility_t visi, int module_func, rb_cref_t *prev_cref, int pushed_by_eval)
13625{
13626 return vm_cref_new0(klass, visi, module_func, prev_cref, pushed_by_eval, 1, 0);
13627}
13628static int
13629ref_delete_symkey(VALUE key, VALUE value, VALUE unused)
13630{
13631 return RB_SYMBOL_P(key) ? ST_DELETE : ST_CONTINUE;
13632}
13633static rb_cref_t *
13634vm_cref_dup(const rb_cref_t *cref)
13635{
13636 const rb_scope_visibility_t *visi = CREF_SCOPE_VISI(cref);
13637 rb_cref_t *next_cref = CREF_NEXT(cref), *new_cref;
13638 int pushed_by_eval = CREF_PUSHED_BY_EVAL(cref);
13639 int singleton = CREF_SINGLETON(cref);
13640 new_cref = vm_cref_new(cref->klass_or_self, visi->method_visi, visi->module_func, next_cref, pushed_by_eval, singleton);
13641 if (!RB_NIL_P(CREF_REFINEMENTS(cref))) {
13642 VALUE ref = rb_hash_dup(CREF_REFINEMENTS(cref));
13643 rb_hash_foreach(ref, ref_delete_symkey, ((VALUE)RUBY_Qnil));
13644 CREF_REFINEMENTS_SET(new_cref, ref);
13645 CREF_OMOD_SHARED_UNSET(new_cref);
13646 }
13647 return new_cref;
13648}static inline
13649rb_cref_t *
13650rb_vm_cref_dup_without_refinements(const rb_cref_t *cref)
13651{
13652 const rb_scope_visibility_t *visi = CREF_SCOPE_VISI(cref);
13653 rb_cref_t *next_cref = CREF_NEXT(cref), *new_cref;
13654 int pushed_by_eval = CREF_PUSHED_BY_EVAL(cref);
13655 int singleton = CREF_SINGLETON(cref);
13656 new_cref = vm_cref_new(cref->klass_or_self, visi->method_visi, visi->module_func, next_cref, pushed_by_eval, singleton);
13657 if (!RB_NIL_P(CREF_REFINEMENTS(cref))) {
13658 CREF_REFINEMENTS_SET(new_cref, ((VALUE)RUBY_Qnil));
13659 CREF_OMOD_SHARED_UNSET(new_cref);
13660 }
13661 return new_cref;
13662}
13663static rb_cref_t *
13664vm_cref_new_toplevel(rb_execution_context_t *ec)
13665{
13666 rb_cref_t *cref = vm_cref_new(rb_cObject, METHOD_VISI_PRIVATE , 0, ((void *)0), 0, 0);
13667 VALUE top_wrapper = rb_ec_thread_ptr(ec)->top_wrapper;
13668 if (top_wrapper) {
13669 cref = vm_cref_new(top_wrapper, METHOD_VISI_PRIVATE, 0, cref, 0, 0);
13670 }
13671 return cref;
13672}static inline
13673rb_cref_t *
13674rb_vm_cref_new_toplevel(void)
13675{
13676 return vm_cref_new_toplevel(rb_current_execution_context(1));
13677}
13678static void
13679vm_cref_dump(const char *mesg, const rb_cref_t *cref)
13680{
13681 ruby_debug_printf("vm_cref_dump: %s (%p)\n", mesg, (void *)cref);
13682 while (cref) {
13683 ruby_debug_printf("= cref| klass: %s\n", RSTRING_PTR(rb_class_path(CREF_CLASS(cref))));
13684 cref = CREF_NEXT(cref);
13685 }
13686}static inline
13687void
13688rb_vm_block_ep_update(VALUE obj, const struct rb_block *dst, const VALUE *ep)
13689{
13690 *((const VALUE **)&dst->as.captured.ep) = ep;
13691 (rb_obj_written((VALUE)(obj), (VALUE)(((VALUE)RUBY_Qundef)), (VALUE)(VM_ENV_ENVVAL(ep)), "./vm.c", 357));
13692}
13693static void
13694vm_bind_update_env(VALUE bindval, rb_binding_t *bind, VALUE envval)
13695{
13696 const rb_env_t *env = (rb_env_t *)envval;
13697 rb_obj_write((VALUE)(bindval), __extension__({
13698 ;
13699 ; __typeof__((VALUE *)(&bind->block.as.captured.code.iseq)) unaligned_member_access_result = ((VALUE *)(&bind->block.as.captured.code.iseq));
13700 ; unaligned_member_access_result; }), (VALUE)(env->iseq), "./vm.c", 364);
13701 rb_vm_block_ep_update(bindval, &bind->block, env->ep);
13702}
13703static VALUE vm_make_env_object(const rb_execution_context_t *ec, rb_control_frame_t *cfp);
13704extern VALUE rb_vm_invoke_bmethod(rb_execution_context_t *ec, rb_proc_t *proc, VALUE self,
13705 int argc, const VALUE *argv, int kw_splat, VALUE block_handler,
13706 const rb_callable_method_entry_t *me);
13707static VALUE vm_invoke_proc(rb_execution_context_t *ec, rb_proc_t *proc, VALUE self, int argc, const VALUE *argv, int kw_splat, VALUE block_handler);
13708typedef enum {
13709 CONST_DEPRECATED = 0x100,
13710 CONST_VISIBILITY_MASK = 0xff,
13711 CONST_PUBLIC = 0x00,
13712 CONST_PRIVATE,
13713 CONST_VISIBILITY_MAX
13714} rb_const_flag_t;
13715typedef struct rb_const_entry_struct {
13716 rb_const_flag_t flag;
13717 int line;
13718 VALUE value;
13719 VALUE file;
13720} rb_const_entry_t;
13721VALUE rb_mod_private_constant(int argc, const VALUE *argv, VALUE obj);
13722VALUE rb_mod_public_constant(int argc, const VALUE *argv, VALUE obj);
13723VALUE rb_mod_deprecate_constant(int argc, const VALUE *argv, VALUE obj);
13724void rb_free_const_table(struct rb_id_table *tbl);
13725VALUE rb_const_source_location(VALUE, ID);
13726
13727
13728int rb_autoloading_value(VALUE mod, ID id, VALUE *value, rb_const_flag_t *flag);
13729rb_const_entry_t *rb_const_lookup(VALUE klass, ID id);
13730VALUE rb_public_const_get_at(VALUE klass, ID id);
13731VALUE rb_public_const_get_from(VALUE klass, ID id);
13732int rb_public_const_defined_from(VALUE klass, ID id);
13733VALUE rb_const_source_location_at(VALUE, ID);
13734
13735
13736enum {
13737 cmp_opt_Integer,
13738 cmp_opt_String,
13739 cmp_opt_Float,
13740 cmp_optimizable_count
13741};
13742struct cmp_opt_data {
13743 unsigned int opt_methods;
13744 unsigned int opt_inited;
13745};
13746VALUE rb_invcmp(VALUE, VALUE);
13747struct ar_table_struct;
13748typedef unsigned char ar_hint_t;
13749enum ruby_rhash_flags {
13750 RHASH_PASS_AS_KEYWORDS = ((VALUE)RUBY_FL_USER1),
13751 RHASH_PROC_DEFAULT = ((VALUE)RUBY_FL_USER2),
13752 RHASH_ST_TABLE_FLAG = ((VALUE)RUBY_FL_USER3),
13753 RHASH_AR_TABLE_SIZE_MASK = (((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6)|((VALUE)RUBY_FL_USER7)),
13754 RHASH_AR_TABLE_SIZE_SHIFT = (((VALUE)RUBY_FL_USHIFT)+4),
13755 RHASH_AR_TABLE_BOUND_MASK = (((VALUE)RUBY_FL_USER8)|((VALUE)RUBY_FL_USER9)|((VALUE)RUBY_FL_USER10)|((VALUE)RUBY_FL_USER11)),
13756 RHASH_AR_TABLE_BOUND_SHIFT = (((VALUE)RUBY_FL_USHIFT)+8),
13757 RHASH_TRANSIENT_FLAG = ((VALUE)RUBY_FL_USER12),
13758 RHASH_LEV_SHIFT = (((VALUE)RUBY_FL_USHIFT) + 13),
13759 RHASH_LEV_MAX = 127,
13760};
13761struct RHash {
13762 struct RBasic basic;
13763 union {
13764 st_table *st;
13765 struct ar_table_struct *ar;
13766 } as;
13767 const VALUE ifnone;
13768 union {
13769 ar_hint_t ary[8];
13770 VALUE word;
13771 } ar_hint;
13772};
13773void rb_hash_st_table_set(VALUE hash, st_table *st);
13774VALUE rb_hash_default_value(VALUE hash, VALUE key);
13775VALUE rb_hash_set_default_proc(VALUE hash, VALUE proc);
13776long rb_dbl_long_hash(double d);
13777st_table *rb_init_identtable(void);
13778VALUE rb_to_hash_type(VALUE obj);
13779VALUE rb_hash_key_str(VALUE);
13780VALUE rb_hash_values(VALUE hash);
13781VALUE rb_hash_rehash(VALUE hash);
13782int rb_hash_add_new_element(VALUE hash, VALUE key, VALUE val);
13783VALUE rb_hash_set_pair(VALUE hash, VALUE pair);
13784int rb_hash_stlike_delete(VALUE hash, st_data_t *pkey, st_data_t *pval);
13785int rb_hash_stlike_foreach_with_replace(VALUE hash, st_foreach_check_callback_func *func, st_update_callback_func *replace, st_data_t arg);
13786int rb_hash_stlike_update(VALUE hash, st_data_t key, st_update_callback_func *func, st_data_t arg);
13787extern st_table *rb_hash_st_table(VALUE hash);
13788VALUE rb_ident_hash_new_with_size(st_index_t size);
13789static inline unsigned RHASH_AR_TABLE_SIZE_RAW(VALUE h);
13790static inline VALUE RHASH_IFNONE(VALUE h);
13791static inline size_t RHASH_SIZE(VALUE h);
13792static inline _Bool RHASH_EMPTY_P(VALUE h);
13793static inline _Bool RHASH_AR_TABLE_P(VALUE h);
13794static inline _Bool RHASH_ST_TABLE_P(VALUE h);
13795static inline struct ar_table_struct *RHASH_AR_TABLE(VALUE h);
13796static inline st_table *RHASH_ST_TABLE(VALUE h);
13797static inline size_t RHASH_ST_SIZE(VALUE h);
13798static inline void RHASH_ST_CLEAR(VALUE h);
13799static inline _Bool RHASH_TRANSIENT_P(VALUE h);
13800static inline void RHASH_SET_TRANSIENT_FLAG(VALUE h);
13801static inline void RHASH_UNSET_TRANSIENT_FLAG(VALUE h);
13802
13803
13804VALUE rb_hash_delete_entry(VALUE hash, VALUE key);
13805VALUE rb_ident_hash_new(void);
13806int rb_hash_stlike_foreach(VALUE hash, st_foreach_callback_func *func, st_data_t arg);
13807
13808
13809
13810
13811VALUE rb_hash_new_with_size(st_index_t size);
13812VALUE rb_hash_resurrect(VALUE hash);
13813int rb_hash_stlike_lookup(VALUE hash, st_data_t key, st_data_t *pval);
13814VALUE rb_hash_keys(VALUE hash);
13815VALUE rb_hash_has_key(VALUE hash, VALUE key);
13816VALUE rb_hash_compare_by_id_p(VALUE hash);
13817st_table *rb_hash_tbl_raw(VALUE hash, const char *file, int line);
13818
13819
13820VALUE rb_hash_compare_by_id(VALUE hash);
13821static inline _Bool
13822RHASH_AR_TABLE_P(VALUE h)
13823{
13824 return ! RB_FL_TEST_RAW(h, RHASH_ST_TABLE_FLAG);
13825}
13826static inline struct ar_table_struct *
13827RHASH_AR_TABLE(VALUE h)
13828{
13829 return ((struct RHash *)(h))->as.ar;
13830}
13831static inline st_table *
13832RHASH_ST_TABLE(VALUE h)
13833{
13834 return ((struct RHash *)(h))->as.st;
13835}
13836static inline VALUE
13837RHASH_IFNONE(VALUE h)
13838{
13839 return ((struct RHash *)(h))->ifnone;
13840}
13841static inline size_t
13842RHASH_SIZE(VALUE h)
13843{
13844 if (RHASH_AR_TABLE_P(h)) {
13845 return RHASH_AR_TABLE_SIZE_RAW(h);
13846 }
13847 else {
13848 return RHASH_ST_SIZE(h);
13849 }
13850}
13851static inline _Bool
13852RHASH_EMPTY_P(VALUE h)
13853{
13854 return RHASH_SIZE(h) == 0;
13855}
13856static inline _Bool
13857RHASH_ST_TABLE_P(VALUE h)
13858{
13859 return ! RHASH_AR_TABLE_P(h);
13860}
13861static inline size_t
13862RHASH_ST_SIZE(VALUE h)
13863{
13864 return RHASH_ST_TABLE(h)->num_entries;
13865}
13866static inline void
13867RHASH_ST_CLEAR(VALUE h)
13868{
13869 RB_FL_UNSET_RAW(h, RHASH_ST_TABLE_FLAG);
13870 ((struct RHash *)(h))->as.ar = ((void *)0);
13871}
13872static inline unsigned
13873RHASH_AR_TABLE_SIZE_RAW(VALUE h)
13874{
13875 VALUE ret = RB_FL_TEST_RAW(h, RHASH_AR_TABLE_SIZE_MASK);
13876 ret >>= RHASH_AR_TABLE_SIZE_SHIFT;
13877 return (unsigned)ret;
13878}
13879static inline _Bool
13880RHASH_TRANSIENT_P(VALUE h)
13881{
13882 return RB_FL_TEST_RAW(h, RHASH_TRANSIENT_FLAG);
13883}
13884static inline void
13885RHASH_SET_TRANSIENT_FLAG(VALUE h)
13886{
13887 RB_FL_SET_RAW(h, RHASH_TRANSIENT_FLAG);
13888}
13889static inline void
13890RHASH_UNSET_TRANSIENT_FLAG(VALUE h)
13891{
13892 RB_FL_UNSET_RAW(h, RHASH_TRANSIENT_FLAG);
13893}
13894enum rb_int_parse_flags {
13895 RB_INT_PARSE_SIGN = 0x01,
13896 RB_INT_PARSE_UNDERSCORE = 0x02,
13897 RB_INT_PARSE_PREFIX = 0x04,
13898 RB_INT_PARSE_ALL = 0x07,
13899 RB_INT_PARSE_DEFAULT = 0x07,
13900};
13901struct RBignum {
13902 struct RBasic basic;
13903 union {
13904 struct {
13905 size_t len;
13906 unsigned int *digits;
13907 } heap;
13908 unsigned int ary[(8*3/4)];
13909 } as;
13910};
13911extern const char ruby_digitmap[];
13912double rb_big_fdiv_double(VALUE x, VALUE y);
13913VALUE rb_big_uminus(VALUE x);
13914VALUE rb_big_hash(VALUE);
13915VALUE rb_big_odd_p(VALUE);
13916VALUE rb_big_even_p(VALUE);
13917size_t rb_big_size(VALUE);
13918VALUE rb_integer_float_cmp(VALUE x, VALUE y);
13919VALUE rb_integer_float_eq(VALUE x, VALUE y);
13920VALUE rb_str_convert_to_inum(VALUE str, int base, int badcheck, int raise_exception);
13921VALUE rb_big_comp(VALUE x);
13922VALUE rb_big_aref(VALUE x, VALUE y);
13923VALUE rb_big_abs(VALUE x);
13924VALUE rb_big_size_m(VALUE big);
13925VALUE rb_big_bit_length(VALUE big);
13926VALUE rb_big_remainder(VALUE x, VALUE y);
13927VALUE rb_big_gt(VALUE x, VALUE y);
13928VALUE rb_big_ge(VALUE x, VALUE y);
13929VALUE rb_big_lt(VALUE x, VALUE y);
13930VALUE rb_big_le(VALUE x, VALUE y);
13931VALUE rb_int_powm(int const argc, VALUE * const argv, VALUE const num);
13932VALUE rb_big_isqrt(VALUE n);
13933static inline _Bool BIGNUM_SIGN(VALUE b);
13934static inline _Bool BIGNUM_POSITIVE_P(VALUE b);
13935static inline _Bool BIGNUM_NEGATIVE_P(VALUE b);
13936static inline void BIGNUM_SET_SIGN(VALUE b, _Bool sign);
13937static inline void BIGNUM_NEGATE(VALUE b);
13938static inline size_t BIGNUM_LEN(VALUE b);
13939static inline unsigned int *BIGNUM_DIGITS(VALUE b);
13940static inline int BIGNUM_LENINT(VALUE b);
13941static inline _Bool BIGNUM_EMBED_P(VALUE b);
13942
13943
13944VALUE rb_big_mul_normal(VALUE x, VALUE y);
13945VALUE rb_big_mul_balance(VALUE x, VALUE y);
13946VALUE rb_big_mul_karatsuba(VALUE x, VALUE y);
13947VALUE rb_big_mul_toom3(VALUE x, VALUE y);
13948VALUE rb_big_sq_fast(VALUE x);
13949VALUE rb_big_divrem_normal(VALUE x, VALUE y);
13950VALUE rb_big2str_poweroftwo(VALUE x, int base);
13951VALUE rb_big2str_generic(VALUE x, int base);
13952VALUE rb_str2big_poweroftwo(VALUE arg, int base, int badcheck);
13953VALUE rb_str2big_normal(VALUE arg, int base, int badcheck);
13954VALUE rb_str2big_karatsuba(VALUE arg, int base, int badcheck);
13955VALUE rb_big_mul_gmp(VALUE x, VALUE y);
13956VALUE rb_big_divrem_gmp(VALUE x, VALUE y);
13957VALUE rb_big2str_gmp(VALUE x, int base);
13958VALUE rb_str2big_gmp(VALUE arg, int base, int badcheck);
13959VALUE rb_int_parse_cstr(const char *str, ssize_t len, char **endp, size_t *ndigits, int base, int flags);
13960
13961
13962
13963
13964VALUE rb_int128t2big(__int128 n);
13965
13966
13967static inline _Bool
13968BIGNUM_SIGN(VALUE b)
13969{
13970 return RB_FL_TEST_RAW(b, ((VALUE)RUBY_FL_USER1));
13971}
13972static inline _Bool
13973BIGNUM_POSITIVE_P(VALUE b)
13974{
13975 return BIGNUM_SIGN(b);
13976}
13977static inline _Bool
13978BIGNUM_NEGATIVE_P(VALUE b)
13979{
13980 return ! BIGNUM_POSITIVE_P(b);
13981}
13982static inline void
13983BIGNUM_SET_SIGN(VALUE b, _Bool sign)
13984{
13985 if (sign) {
13986 RB_FL_SET_RAW(b, ((VALUE)RUBY_FL_USER1));
13987 }
13988 else {
13989 RB_FL_UNSET_RAW(b, ((VALUE)RUBY_FL_USER1));
13990 }
13991}
13992static inline void
13993BIGNUM_NEGATE(VALUE b)
13994{
13995 RB_FL_REVERSE_RAW(b, ((VALUE)RUBY_FL_USER1));
13996}
13997static inline size_t
13998BIGNUM_LEN(VALUE b)
13999{
14000 if (! BIGNUM_EMBED_P(b)) {
14001 return ((struct RBignum *)(b))->as.heap.len;
14002 }
14003 else {
14004 size_t ret = ((struct RBasic *)(b))->flags;
14005 ret &= (~(~(VALUE)0U << 3) << (((VALUE)RUBY_FL_USHIFT)+3));
14006 ret >>= (((VALUE)RUBY_FL_USHIFT)+3);
14007 return ret;
14008 }
14009}
14010static inline int
14011BIGNUM_LENINT(VALUE b)
14012{
14013 return rb_long2int_inline(BIGNUM_LEN(b));
14014}
14015static inline unsigned int *
14016BIGNUM_DIGITS(VALUE b)
14017{
14018 if (BIGNUM_EMBED_P(b)) {
14019 return ((struct RBignum *)(b))->as.ary;
14020 }
14021 else {
14022 return ((struct RBignum *)(b))->as.heap.digits;
14023 }
14024}
14025static inline _Bool
14026BIGNUM_EMBED_P(VALUE b)
14027{
14028 return RB_FL_TEST_RAW(b, ((VALUE)((VALUE)RUBY_FL_USER2)));
14029}
14030static inline uint16_t ruby_swap16(uint16_t);
14031static inline uint32_t ruby_swap32(uint32_t);
14032static inline uint64_t ruby_swap64(uint64_t);
14033static inline unsigned nlz_int(unsigned x);
14034static inline unsigned nlz_long(unsigned long x);
14035static inline unsigned nlz_long_long(unsigned long long x);
14036static inline unsigned nlz_intptr(uintptr_t x);
14037static inline unsigned nlz_int32(uint32_t x);
14038static inline unsigned nlz_int64(uint64_t x);
14039static inline unsigned nlz_int128(unsigned __int128 x);
14040static inline unsigned rb_popcount32(uint32_t x);
14041static inline unsigned rb_popcount64(uint64_t x);
14042static inline unsigned rb_popcount_intptr(uintptr_t x);
14043static inline int ntz_int32(uint32_t x);
14044static inline int ntz_int64(uint64_t x);
14045static inline int ntz_intptr(uintptr_t x);
14046static inline VALUE RUBY_BIT_ROTL(VALUE, int);
14047static inline VALUE RUBY_BIT_ROTR(VALUE, int);
14048static inline uint16_t
14049ruby_swap16(uint16_t x)
14050{
14051 return __builtin_bswap16(x);
14052}
14053static inline uint32_t
14054ruby_swap32(uint32_t x)
14055{
14056 return __builtin_bswap32(x);
14057}
14058static inline uint64_t
14059ruby_swap64(uint64_t x)
14060{
14061 return __builtin_bswap64(x);
14062}
14063static inline unsigned int
14064nlz_int32(uint32_t x)
14065{
14066 __extension__ _Static_assert(sizeof(int) * 8 == 32, "sizeof_int" ": " "sizeof(int) * CHAR_BIT == 32");
14067 return x ? (unsigned int)__builtin_clz(x) : 32;
14068}
14069static inline unsigned int
14070nlz_int64(uint64_t x)
14071{
14072 if (x == 0) {
14073 return 64;
14074 }
14075 else if (sizeof(long) * 8 == 64) {
14076 return (unsigned int)__builtin_clzl((unsigned long)x);
14077 }
14078 else if (sizeof(long long) * 8 == 64) {
14079 return (unsigned int)__builtin_clzll((unsigned long long)x);
14080 }
14081 else {
14082 __builtin_unreachable();
14083 }
14084}
14085static inline unsigned int
14086nlz_int128(unsigned __int128 x)
14087{
14088 uint64_t y = (uint64_t)(x >> 64);
14089 if (x == 0) {
14090 return 128;
14091 }
14092 else if (y == 0) {
14093 return (unsigned int)nlz_int64(x) + 64;
14094 }
14095 else {
14096 return (unsigned int)nlz_int64(y);
14097 }
14098}
14099static inline unsigned int
14100nlz_int(unsigned int x)
14101{
14102 if (sizeof(unsigned int) * 8 == 32) {
14103 return nlz_int32((uint32_t)x);
14104 }
14105 else if (sizeof(unsigned int) * 8 == 64) {
14106 return nlz_int64((uint64_t)x);
14107 }
14108 else {
14109 __builtin_unreachable();
14110 }
14111}
14112static inline unsigned int
14113nlz_long(unsigned long x)
14114{
14115 if (sizeof(unsigned long) * 8 == 32) {
14116 return nlz_int32((uint32_t)x);
14117 }
14118 else if (sizeof(unsigned long) * 8 == 64) {
14119 return nlz_int64((uint64_t)x);
14120 }
14121 else {
14122 __builtin_unreachable();
14123 }
14124}
14125static inline unsigned int
14126nlz_long_long(unsigned long long x)
14127{
14128 if (sizeof(unsigned long long) * 8 == 64) {
14129 return nlz_int64((uint64_t)x);
14130 }
14131 else if (sizeof(unsigned long long) * 8 == 128) {
14132 return nlz_int128((unsigned __int128)x);
14133 }
14134 else {
14135 __builtin_unreachable();
14136 }
14137}
14138static inline unsigned int
14139nlz_intptr(uintptr_t x)
14140{
14141 if (sizeof(uintptr_t) == sizeof(unsigned int)) {
14142 return nlz_int((unsigned int)x);
14143 }
14144 if (sizeof(uintptr_t) == sizeof(unsigned long)) {
14145 return nlz_long((unsigned long)x);
14146 }
14147 if (sizeof(uintptr_t) == sizeof(unsigned long long)) {
14148 return nlz_long_long((unsigned long long)x);
14149 }
14150 else {
14151 __builtin_unreachable();
14152 }
14153}
14154static inline unsigned int
14155rb_popcount32(uint32_t x)
14156{
14157 __extension__ _Static_assert(sizeof(int) * 8 >= 32, "sizeof_int" ": " "sizeof(int) * CHAR_BIT >= 32");
14158 return (unsigned int)__builtin_popcount(x);
14159}
14160static inline unsigned int
14161rb_popcount64(uint64_t x)
14162{
14163 if (sizeof(long) * 8 == 64) {
14164 return (unsigned int)__builtin_popcountl((unsigned long)x);
14165 }
14166 else if (sizeof(long long) * 8 == 64) {
14167 return (unsigned int)__builtin_popcountll((unsigned long long)x);
14168 }
14169 else {
14170 __builtin_unreachable();
14171 }
14172}
14173static inline unsigned int
14174rb_popcount_intptr(uintptr_t x)
14175{
14176 if (sizeof(uintptr_t) * 8 == 64) {
14177 return rb_popcount64((uint64_t)x);
14178 }
14179 else if (sizeof(uintptr_t) * 8 == 32) {
14180 return rb_popcount32((uint32_t)x);
14181 }
14182 else {
14183 __builtin_unreachable();
14184 }
14185}
14186static inline int
14187ntz_int32(uint32_t x)
14188{
14189 __extension__ _Static_assert(sizeof(int) * 8 == 32, "sizeof_int" ": " "sizeof(int) * CHAR_BIT == 32");
14190 return x ? (unsigned)__builtin_ctz(x) : 32;
14191}
14192static inline int
14193ntz_int64(uint64_t x)
14194{
14195 if (x == 0) {
14196 return 64;
14197 }
14198 else if (sizeof(long) * 8 == 64) {
14199 return (unsigned)__builtin_ctzl((unsigned long)x);
14200 }
14201 else if (sizeof(long long) * 8 == 64) {
14202 return (unsigned)__builtin_ctzll((unsigned long long)x);
14203 }
14204 else {
14205 __builtin_unreachable();
14206 }
14207}
14208static inline int
14209ntz_intptr(uintptr_t x)
14210{
14211 if (sizeof(uintptr_t) * 8 == 64) {
14212 return ntz_int64((uint64_t)x);
14213 }
14214 else if (sizeof(uintptr_t) * 8 == 32) {
14215 return ntz_int32((uint32_t)x);
14216 }
14217 else {
14218 __builtin_unreachable();
14219 }
14220}
14221static inline VALUE
14222RUBY_BIT_ROTL(VALUE v, int n)
14223{
14224 const int m = (sizeof(VALUE) * 8) - 1;
14225 return (v << (n & m)) | (v >> (-n & m));
14226}
14227static inline VALUE
14228RUBY_BIT_ROTR(VALUE v, int n)
14229{
14230 const int m = (sizeof(VALUE) * 8) - 1;
14231 return (v << (-n & m)) | (v >> (n & m));
14232}
14233VALUE rb_int128t2big(__int128 n);
14234static inline long rb_overflowed_fix_to_int(long x);
14235static inline VALUE rb_fix_plus_fix(VALUE x, VALUE y);
14236static inline VALUE rb_fix_minus_fix(VALUE x, VALUE y);
14237static inline VALUE rb_fix_mul_fix(VALUE x, VALUE y);
14238static inline void rb_fix_divmod_fix(VALUE x, VALUE y, VALUE *divp, VALUE *modp);
14239static inline VALUE rb_fix_div_fix(VALUE x, VALUE y);
14240static inline VALUE rb_fix_mod_fix(VALUE x, VALUE y);
14241static inline _Bool FIXNUM_POSITIVE_P(VALUE num);
14242static inline _Bool FIXNUM_NEGATIVE_P(VALUE num);
14243static inline _Bool FIXNUM_ZERO_P(VALUE num);
14244static inline long
14245rb_overflowed_fix_to_int(long x)
14246{
14247 return (long)((unsigned long)(x >> 1) ^ (1LU << (8 * 8 - 1)));
14248}
14249static inline VALUE
14250rb_fix_plus_fix(VALUE x, VALUE y)
14251{
14252 long lz;
14253 if (__builtin_add_overflow((long)x, (long)y-1, &lz)) {
14254 return rb_int2big(rb_overflowed_fix_to_int(lz));
14255 }
14256 else {
14257 return (VALUE)lz;
14258 }
14259}
14260static inline VALUE
14261rb_fix_minus_fix(VALUE x, VALUE y)
14262{
14263 long lz;
14264 if (__builtin_sub_overflow((long)x, (long)y-1, &lz)) {
14265 return rb_int2big(rb_overflowed_fix_to_int(lz));
14266 }
14267 else {
14268 return (VALUE)lz;
14269 }
14270}
14271static inline VALUE
14272rb_fix_mul_fix(VALUE x, VALUE y)
14273{
14274 long lx = rb_fix2long(x);
14275 long ly = rb_fix2long(y);
14276 return (((((__int128)lx * (__int128)ly) < (0x7fffffffffffffffL / 2) + 1) && (((__int128)lx * (__int128)ly) >= ((-0x7fffffffffffffffL - 1L) / 2))) ? RB_INT2FIX((__int128)lx * (__int128)ly) : rb_int128t2big((__int128)lx * (__int128)ly));
14277}
14278static inline void
14279rb_fix_divmod_fix(VALUE a, VALUE b, VALUE *divp, VALUE *modp)
14280{
14281 long x = rb_fix2long(a);
14282 long y = rb_fix2long(b);
14283 long div, mod;
14284 if (x == ((-0x7fffffffffffffffL - 1L) / 2) && y == -1) {
14285 if (divp) *divp = rb_long2num_inline(-((-0x7fffffffffffffffL - 1L) / 2));
14286 if (modp) *modp = RB_INT2FIX(0);
14287 return;
14288 }
14289 div = x / y;
14290 mod = x % y;
14291 if (y > 0 ? mod < 0 : mod > 0) {
14292 mod += y;
14293 div -= 1;
14294 }
14295 if (divp) *divp = RB_INT2FIX(div);
14296 if (modp) *modp = RB_INT2FIX(mod);
14297}
14298static inline VALUE
14299rb_fix_div_fix(VALUE x, VALUE y)
14300{
14301 VALUE div;
14302 rb_fix_divmod_fix(x, y, &div, ((void *)0));
14303 return div;
14304}
14305static inline VALUE
14306rb_fix_mod_fix(VALUE x, VALUE y)
14307{
14308 VALUE mod;
14309 rb_fix_divmod_fix(x, y, ((void *)0), &mod);
14310 return mod;
14311}
14312static inline _Bool
14313FIXNUM_POSITIVE_P(VALUE num)
14314{
14315 return (long)num > (long)__builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0));
14316}
14317static inline _Bool
14318FIXNUM_NEGATIVE_P(VALUE num)
14319{
14320 return (long)num < 0;
14321}
14322static inline _Bool
14323FIXNUM_ZERO_P(VALUE num)
14324{
14325 return num == __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0));
14326}
14327enum ruby_num_rounding_mode {
14328 RUBY_NUM_ROUND_HALF_UP,
14329 RUBY_NUM_ROUND_HALF_EVEN,
14330 RUBY_NUM_ROUND_HALF_DOWN,
14331 RUBY_NUM_ROUND_DEFAULT = RUBY_NUM_ROUND_HALF_UP,
14332};
14333typedef double rb_float_value_type;
14334struct RFloat {
14335 struct RBasic basic;
14336 rb_float_value_type float_value;
14337};
14338int rb_num_to_uint(VALUE val, unsigned int *ret);
14339VALUE ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl);
14340double ruby_float_step_size(double beg, double end, double unit, int excl);
14341int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl, int allow_endless);
14342int rb_num_negative_p(VALUE);
14343VALUE rb_int_succ(VALUE num);
14344VALUE rb_float_uminus(VALUE num);
14345VALUE rb_int_plus(VALUE x, VALUE y);
14346VALUE rb_float_plus(VALUE x, VALUE y);
14347VALUE rb_int_minus(VALUE x, VALUE y);
14348VALUE rb_float_minus(VALUE x, VALUE y);
14349VALUE rb_int_mul(VALUE x, VALUE y);
14350VALUE rb_float_mul(VALUE x, VALUE y);
14351VALUE rb_float_div(VALUE x, VALUE y);
14352VALUE rb_int_idiv(VALUE x, VALUE y);
14353VALUE rb_int_modulo(VALUE x, VALUE y);
14354VALUE rb_int2str(VALUE num, int base);
14355VALUE rb_fix_plus(VALUE x, VALUE y);
14356VALUE rb_int_gt(VALUE x, VALUE y);
14357VALUE rb_float_gt(VALUE x, VALUE y);
14358VALUE rb_int_ge(VALUE x, VALUE y);
14359enum ruby_num_rounding_mode rb_num_get_rounding_option(VALUE opts);
14360double rb_int_fdiv_double(VALUE x, VALUE y);
14361VALUE rb_int_pow(VALUE x, VALUE y);
14362VALUE rb_float_pow(VALUE x, VALUE y);
14363VALUE rb_int_cmp(VALUE x, VALUE y);
14364VALUE rb_int_equal(VALUE x, VALUE y);
14365VALUE rb_int_divmod(VALUE x, VALUE y);
14366VALUE rb_int_and(VALUE x, VALUE y);
14367VALUE rb_int_lshift(VALUE x, VALUE y);
14368VALUE rb_int_div(VALUE x, VALUE y);
14369int rb_int_positive_p(VALUE num);
14370int rb_int_negative_p(VALUE num);
14371VALUE rb_check_integer_type(VALUE);
14372VALUE rb_num_pow(VALUE x, VALUE y);
14373VALUE rb_float_ceil(VALUE num, int ndigits);
14374VALUE rb_float_floor(VALUE x, int ndigits);
14375VALUE rb_float_abs(VALUE flt);
14376static inline VALUE rb_num_compare_with_zero(VALUE num, ID mid);
14377static inline int rb_num_positive_int_p(VALUE num);
14378static inline int rb_num_negative_int_p(VALUE num);
14379static inline double rb_float_flonum_value(VALUE v);
14380static inline double rb_float_noflonum_value(VALUE v);
14381static inline double rb_float_value_inline(VALUE v);
14382static inline VALUE rb_float_new_inline(double d);
14383static inline _Bool INT_POSITIVE_P(VALUE num);
14384static inline _Bool INT_NEGATIVE_P(VALUE num);
14385static inline _Bool FLOAT_ZERO_P(VALUE num);
14386
14387
14388
14389
14390
14391
14392VALUE rb_flo_div_flo(VALUE x, VALUE y);
14393double ruby_float_mod(double x, double y);
14394VALUE rb_float_equal(VALUE x, VALUE y);
14395int rb_float_cmp(VALUE x, VALUE y);
14396VALUE rb_float_eql(VALUE x, VALUE y);
14397VALUE rb_fix_aref(VALUE fix, VALUE idx);
14398VALUE rb_int_zero_p(VALUE num);
14399VALUE rb_int_even_p(VALUE num);
14400VALUE rb_int_odd_p(VALUE num);
14401VALUE rb_int_abs(VALUE num);
14402VALUE rb_int_bit_length(VALUE num);
14403VALUE rb_int_uminus(VALUE num);
14404VALUE rb_int_comp(VALUE num);
14405
14406
14407static inline _Bool
14408INT_POSITIVE_P(VALUE num)
14409{
14410 if (RB_FIXNUM_P(num)) {
14411 return FIXNUM_POSITIVE_P(num);
14412 }
14413 else {
14414 return BIGNUM_POSITIVE_P(num);
14415 }
14416}
14417static inline _Bool
14418INT_NEGATIVE_P(VALUE num)
14419{
14420 if (RB_FIXNUM_P(num)) {
14421 return FIXNUM_NEGATIVE_P(num);
14422 }
14423 else {
14424 return BIGNUM_NEGATIVE_P(num);
14425 }
14426}
14427static inline _Bool
14428FLOAT_ZERO_P(VALUE num)
14429{
14430 return rb_float_value_inline(num) == 0.0;
14431}
14432static inline VALUE
14433rb_num_compare_with_zero(VALUE num, ID mid)
14434{
14435 VALUE zero = __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0));
14436 VALUE r = rb_check_funcall(num, mid, 1, &zero);
14437 if (r == ((VALUE)RUBY_Qundef)) {
14438 rb_cmperr(num, zero);
14439 }
14440 return r;
14441}
14442static inline int
14443rb_num_positive_int_p(VALUE num)
14444{
14445 const ID mid = '>';
14446 if (RB_FIXNUM_P(num)) {
14447 if (rb_method_basic_definition_p(rb_cInteger, mid))
14448 return FIXNUM_POSITIVE_P(num);
14449 }
14450 else if (RB_TYPE_P(num, RUBY_T_BIGNUM)) {
14451 if (rb_method_basic_definition_p(rb_cInteger, mid))
14452 return BIGNUM_POSITIVE_P(num);
14453 }
14454 return RB_TEST(rb_num_compare_with_zero(num, mid));
14455}
14456static inline int
14457rb_num_negative_int_p(VALUE num)
14458{
14459 const ID mid = '<';
14460 if (RB_FIXNUM_P(num)) {
14461 if (rb_method_basic_definition_p(rb_cInteger, mid))
14462 return FIXNUM_NEGATIVE_P(num);
14463 }
14464 else if (RB_TYPE_P(num, RUBY_T_BIGNUM)) {
14465 if (rb_method_basic_definition_p(rb_cInteger, mid))
14466 return BIGNUM_NEGATIVE_P(num);
14467 }
14468 return RB_TEST(rb_num_compare_with_zero(num, mid));
14469}
14470static inline double
14471rb_float_flonum_value(VALUE v)
14472{
14473 if (v != (VALUE)0x8000000000000002) {
14474 union {
14475 double d;
14476 VALUE v;
14477 } t;
14478 VALUE b63 = (v >> 63);
14479 t.v = RUBY_BIT_ROTR((2 - b63) | (v & ~(VALUE)0x03), 3);
14480 return t.d;
14481 }
14482 return 0.0;
14483}
14484static inline double
14485rb_float_noflonum_value(VALUE v)
14486{
14487 return ((struct RFloat *)(v))->float_value;
14488}
14489static inline double
14490rb_float_value_inline(VALUE v)
14491{
14492 if (RB_FLONUM_P(v)) {
14493 return rb_float_flonum_value(v);
14494 }
14495 return rb_float_noflonum_value(v);
14496}
14497static inline VALUE
14498rb_float_new_inline(double d)
14499{
14500 union {
14501 double d;
14502 VALUE v;
14503 } t;
14504 int bits;
14505 t.d = d;
14506 bits = (int)((VALUE)(t.v >> 60) & 0x7);
14507 if (t.v != 0x3000000000000000 &&
14508 !((bits-3) & ~0x01)) {
14509 return (RUBY_BIT_ROTL(t.v, 3) & ~(VALUE)0x01) | 0x02;
14510 }
14511 else if (t.v == (VALUE)0) {
14512 return 0x8000000000000002;
14513 }
14514 return rb_float_new_in_heap(d);
14515}
14516int ruby_fill_random_bytes(void *, size_t, int);
14517void rb_gc_mark_global_tbl(void);
14518void rb_gc_update_global_tbl(void);
14519size_t rb_generic_ivar_memsize(VALUE);
14520VALUE rb_search_class_path(VALUE);
14521VALUE rb_attr_delete(VALUE, ID);
14522VALUE rb_ivar_lookup(VALUE obj, ID id, VALUE undef);
14523void rb_autoload_str(VALUE mod, ID id, VALUE file);
14524VALUE rb_autoload_at_p(VALUE, ID, int);
14525__attribute__((__noreturn__)) VALUE rb_mod_const_missing(VALUE,VALUE);
14526rb_gvar_getter_t *rb_gvar_getter_function_of(ID);
14527rb_gvar_setter_t *rb_gvar_setter_function_of(ID);
14528void rb_gvar_readonly_setter(VALUE v, ID id, VALUE *_);
14529void rb_gvar_ractor_local(const char *name);
14530static inline _Bool ROBJ_TRANSIENT_P(VALUE obj);
14531static inline void ROBJ_TRANSIENT_SET(VALUE obj);
14532static inline void ROBJ_TRANSIENT_UNSET(VALUE obj);
14533uint32_t rb_obj_ensure_iv_index_mapping(VALUE obj, ID id);
14534
14535
14536void rb_mark_generic_ivar(VALUE);
14537void rb_mv_generic_ivar(VALUE src, VALUE dst);
14538VALUE rb_const_missing(VALUE klass, VALUE name);
14539int rb_class_ivar_set(VALUE klass, ID vid, VALUE value);
14540void rb_iv_tbl_copy(VALUE dst, VALUE src);
14541
14542
14543
14544
14545VALUE rb_gvar_get(ID);
14546VALUE rb_gvar_set(ID, VALUE);
14547VALUE rb_gvar_defined(ID);
14548void rb_const_warn_if_deprecated(const rb_const_entry_t *, VALUE, ID);
14549void rb_init_iv_list(VALUE obj);
14550
14551
14552static inline _Bool
14553ROBJ_TRANSIENT_P(VALUE obj)
14554{
14555 return RB_FL_TEST_RAW(obj, ((VALUE)RUBY_FL_USER13));
14556}
14557static inline void
14558ROBJ_TRANSIENT_SET(VALUE obj)
14559{
14560 RB_FL_SET_RAW(obj, ((VALUE)RUBY_FL_USER13));
14561}
14562static inline void
14563ROBJ_TRANSIENT_UNSET(VALUE obj)
14564{
14565 RB_FL_UNSET_RAW(obj, ((VALUE)RUBY_FL_USER13));
14566}
14567enum {
14568 RSTRUCT_EMBED_LEN_MAX = RVALUE_EMBED_LEN_MAX,
14569 RSTRUCT_EMBED_LEN_MASK = (RUBY_FL_USER2|RUBY_FL_USER1),
14570 RSTRUCT_EMBED_LEN_SHIFT = (RUBY_FL_USHIFT+1),
14571 RSTRUCT_TRANSIENT_FLAG = ((VALUE)RUBY_FL_USER3),
14572};
14573struct RStruct {
14574 struct RBasic basic;
14575 union {
14576 struct {
14577 long len;
14578 const VALUE *ptr;
14579 } heap;
14580 const VALUE ary[RSTRUCT_EMBED_LEN_MAX];
14581 } as;
14582};
14583VALUE rb_struct_init_copy(VALUE copy, VALUE s);
14584VALUE rb_struct_lookup(VALUE s, VALUE idx);
14585VALUE rb_struct_s_keyword_init(VALUE klass);
14586static inline const VALUE *rb_struct_const_heap_ptr(VALUE st);
14587static inline _Bool RSTRUCT_TRANSIENT_P(VALUE st);
14588static inline void RSTRUCT_TRANSIENT_SET(VALUE st);
14589static inline void RSTRUCT_TRANSIENT_UNSET(VALUE st);
14590static inline long RSTRUCT_EMBED_LEN(VALUE st);
14591static inline long internal_RSTRUCT_LEN(VALUE st);
14592static inline int RSTRUCT_LENINT(VALUE st);
14593static inline const VALUE *RSTRUCT_CONST_PTR(VALUE st);
14594static inline void internal_RSTRUCT_SET(VALUE st, long k, VALUE v);
14595static inline VALUE internal_RSTRUCT_GET(VALUE st, long k);
14596static inline _Bool
14597RSTRUCT_TRANSIENT_P(VALUE st)
14598{
14599 return RB_FL_TEST_RAW(st, RSTRUCT_TRANSIENT_FLAG);
14600}
14601static inline void
14602RSTRUCT_TRANSIENT_SET(VALUE st)
14603{
14604 RB_FL_SET_RAW(st, RSTRUCT_TRANSIENT_FLAG);
14605}
14606static inline void
14607RSTRUCT_TRANSIENT_UNSET(VALUE st)
14608{
14609 RB_FL_UNSET_RAW(st, RSTRUCT_TRANSIENT_FLAG);
14610}
14611static inline long
14612RSTRUCT_EMBED_LEN(VALUE st)
14613{
14614 long ret = RB_FL_TEST_RAW(st, RSTRUCT_EMBED_LEN_MASK);
14615 ret >>= RSTRUCT_EMBED_LEN_SHIFT;
14616 return ret;
14617}
14618static inline long
14619internal_RSTRUCT_LEN(VALUE st)
14620{
14621 if (RB_FL_TEST_RAW(st, RSTRUCT_EMBED_LEN_MASK)) {
14622 return RSTRUCT_EMBED_LEN(st);
14623 }
14624 else {
14625 return ((struct RStruct *)(st))->as.heap.len;
14626 }
14627}
14628static inline int
14629RSTRUCT_LENINT(VALUE st)
14630{
14631 return rb_long2int_inline(internal_RSTRUCT_LEN(st));
14632}
14633static inline const VALUE *
14634RSTRUCT_CONST_PTR(VALUE st)
14635{
14636 const struct RStruct *p = ((struct RStruct *)(st));
14637 if (RB_FL_TEST_RAW(st, RSTRUCT_EMBED_LEN_MASK)) {
14638 return p->as.ary;
14639 }
14640 else {
14641 return p->as.heap.ptr;
14642 }
14643}
14644static inline void
14645internal_RSTRUCT_SET(VALUE st, long k, VALUE v)
14646{
14647 rb_obj_write((VALUE)(st), __extension__({
14648 ;
14649 ; __typeof__((VALUE *)(&RSTRUCT_CONST_PTR(st)[k])) unaligned_member_access_result = ((VALUE *)(&RSTRUCT_CONST_PTR(st)[k]));
14650 ; unaligned_member_access_result; }), (VALUE)(v), "./internal/struct.h", 137);
14651}
14652static inline VALUE
14653internal_RSTRUCT_GET(VALUE st, long k)
14654{
14655 return RSTRUCT_CONST_PTR(st)[k];
14656}
14657static inline const VALUE *
14658rb_struct_const_heap_ptr(VALUE st)
14659{
14660 return ((struct RStruct *)(st))->as.heap.ptr;
14661}
14662struct gen_ivtbl {
14663 uint32_t numiv;
14664 VALUE ivptr[];
14665};
14666int rb_ivar_generic_ivtbl_lookup(VALUE obj, struct gen_ivtbl **);
14667VALUE rb_ivar_generic_lookup_with_index(VALUE obj, ID id, uint32_t index);
14668enum ruby_vminsn_type {
14669 YARVINSN_nop,
14670 YARVINSN_getlocal,
14671 YARVINSN_setlocal,
14672 YARVINSN_getblockparam,
14673 YARVINSN_setblockparam,
14674 YARVINSN_getblockparamproxy,
14675 YARVINSN_getspecial,
14676 YARVINSN_setspecial,
14677 YARVINSN_getinstancevariable,
14678 YARVINSN_setinstancevariable,
14679 YARVINSN_getclassvariable,
14680 YARVINSN_setclassvariable,
14681 YARVINSN_getconstant,
14682 YARVINSN_setconstant,
14683 YARVINSN_getglobal,
14684 YARVINSN_setglobal,
14685 YARVINSN_putnil,
14686 YARVINSN_putself,
14687 YARVINSN_putobject,
14688 YARVINSN_putspecialobject,
14689 YARVINSN_putstring,
14690 YARVINSN_concatstrings,
14691 YARVINSN_anytostring,
14692 YARVINSN_toregexp,
14693 YARVINSN_intern,
14694 YARVINSN_newarray,
14695 YARVINSN_newarraykwsplat,
14696 YARVINSN_duparray,
14697 YARVINSN_duphash,
14698 YARVINSN_expandarray,
14699 YARVINSN_concatarray,
14700 YARVINSN_splatarray,
14701 YARVINSN_newhash,
14702 YARVINSN_newrange,
14703 YARVINSN_pop,
14704 YARVINSN_dup,
14705 YARVINSN_dupn,
14706 YARVINSN_swap,
14707 YARVINSN_topn,
14708 YARVINSN_setn,
14709 YARVINSN_adjuststack,
14710 YARVINSN_defined,
14711 YARVINSN_checkmatch,
14712 YARVINSN_checkkeyword,
14713 YARVINSN_checktype,
14714 YARVINSN_defineclass,
14715 YARVINSN_definemethod,
14716 YARVINSN_definesmethod,
14717 YARVINSN_send,
14718 YARVINSN_opt_send_without_block,
14719 YARVINSN_objtostring,
14720 YARVINSN_opt_str_freeze,
14721 YARVINSN_opt_nil_p,
14722 YARVINSN_opt_str_uminus,
14723 YARVINSN_opt_newarray_max,
14724 YARVINSN_opt_newarray_min,
14725 YARVINSN_opt_newarray_hash,
14726 YARVINSN_invokesuper,
14727 YARVINSN_invokeblock,
14728 YARVINSN_leave,
14729 YARVINSN_throw,
14730 YARVINSN_jump,
14731 YARVINSN_branchif,
14732 YARVINSN_branchunless,
14733 YARVINSN_branchnil,
14734 YARVINSN_opt_getinlinecache,
14735 YARVINSN_opt_setinlinecache,
14736 YARVINSN_once,
14737 YARVINSN_opt_case_dispatch,
14738 YARVINSN_opt_plus,
14739 YARVINSN_opt_minus,
14740 YARVINSN_opt_mult,
14741 YARVINSN_opt_div,
14742 YARVINSN_opt_mod,
14743 YARVINSN_opt_eq,
14744 YARVINSN_opt_neq,
14745 YARVINSN_opt_lt,
14746 YARVINSN_opt_le,
14747 YARVINSN_opt_gt,
14748 YARVINSN_opt_ge,
14749 YARVINSN_opt_ltlt,
14750 YARVINSN_opt_and,
14751 YARVINSN_opt_or,
14752 YARVINSN_opt_aref,
14753 YARVINSN_opt_aset,
14754 YARVINSN_opt_aset_with,
14755 YARVINSN_opt_aref_with,
14756 YARVINSN_opt_length,
14757 YARVINSN_opt_size,
14758 YARVINSN_opt_empty_p,
14759 YARVINSN_opt_succ,
14760 YARVINSN_opt_not,
14761 YARVINSN_opt_regexpmatch2,
14762 YARVINSN_invokebuiltin,
14763 YARVINSN_opt_invokebuiltin_delegate,
14764 YARVINSN_opt_invokebuiltin_delegate_leave,
14765 YARVINSN_getlocal_WC_0,
14766 YARVINSN_getlocal_WC_1,
14767 YARVINSN_setlocal_WC_0,
14768 YARVINSN_setlocal_WC_1,
14769 YARVINSN_putobject_INT2FIX_0_,
14770 YARVINSN_putobject_INT2FIX_1_,
14771 YARVINSN_trace_nop,
14772 YARVINSN_trace_getlocal,
14773 YARVINSN_trace_setlocal,
14774 YARVINSN_trace_getblockparam,
14775 YARVINSN_trace_setblockparam,
14776 YARVINSN_trace_getblockparamproxy,
14777 YARVINSN_trace_getspecial,
14778 YARVINSN_trace_setspecial,
14779 YARVINSN_trace_getinstancevariable,
14780 YARVINSN_trace_setinstancevariable,
14781 YARVINSN_trace_getclassvariable,
14782 YARVINSN_trace_setclassvariable,
14783 YARVINSN_trace_getconstant,
14784 YARVINSN_trace_setconstant,
14785 YARVINSN_trace_getglobal,
14786 YARVINSN_trace_setglobal,
14787 YARVINSN_trace_putnil,
14788 YARVINSN_trace_putself,
14789 YARVINSN_trace_putobject,
14790 YARVINSN_trace_putspecialobject,
14791 YARVINSN_trace_putstring,
14792 YARVINSN_trace_concatstrings,
14793 YARVINSN_trace_anytostring,
14794 YARVINSN_trace_toregexp,
14795 YARVINSN_trace_intern,
14796 YARVINSN_trace_newarray,
14797 YARVINSN_trace_newarraykwsplat,
14798 YARVINSN_trace_duparray,
14799 YARVINSN_trace_duphash,
14800 YARVINSN_trace_expandarray,
14801 YARVINSN_trace_concatarray,
14802 YARVINSN_trace_splatarray,
14803 YARVINSN_trace_newhash,
14804 YARVINSN_trace_newrange,
14805 YARVINSN_trace_pop,
14806 YARVINSN_trace_dup,
14807 YARVINSN_trace_dupn,
14808 YARVINSN_trace_swap,
14809 YARVINSN_trace_topn,
14810 YARVINSN_trace_setn,
14811 YARVINSN_trace_adjuststack,
14812 YARVINSN_trace_defined,
14813 YARVINSN_trace_checkmatch,
14814 YARVINSN_trace_checkkeyword,
14815 YARVINSN_trace_checktype,
14816 YARVINSN_trace_defineclass,
14817 YARVINSN_trace_definemethod,
14818 YARVINSN_trace_definesmethod,
14819 YARVINSN_trace_send,
14820 YARVINSN_trace_opt_send_without_block,
14821 YARVINSN_trace_objtostring,
14822 YARVINSN_trace_opt_str_freeze,
14823 YARVINSN_trace_opt_nil_p,
14824 YARVINSN_trace_opt_str_uminus,
14825 YARVINSN_trace_opt_newarray_max,
14826 YARVINSN_trace_opt_newarray_min,
14827 YARVINSN_trace_opt_newarray_hash,
14828 YARVINSN_trace_invokesuper,
14829 YARVINSN_trace_invokeblock,
14830 YARVINSN_trace_leave,
14831 YARVINSN_trace_throw,
14832 YARVINSN_trace_jump,
14833 YARVINSN_trace_branchif,
14834 YARVINSN_trace_branchunless,
14835 YARVINSN_trace_branchnil,
14836 YARVINSN_trace_opt_getinlinecache,
14837 YARVINSN_trace_opt_setinlinecache,
14838 YARVINSN_trace_once,
14839 YARVINSN_trace_opt_case_dispatch,
14840 YARVINSN_trace_opt_plus,
14841 YARVINSN_trace_opt_minus,
14842 YARVINSN_trace_opt_mult,
14843 YARVINSN_trace_opt_div,
14844 YARVINSN_trace_opt_mod,
14845 YARVINSN_trace_opt_eq,
14846 YARVINSN_trace_opt_neq,
14847 YARVINSN_trace_opt_lt,
14848 YARVINSN_trace_opt_le,
14849 YARVINSN_trace_opt_gt,
14850 YARVINSN_trace_opt_ge,
14851 YARVINSN_trace_opt_ltlt,
14852 YARVINSN_trace_opt_and,
14853 YARVINSN_trace_opt_or,
14854 YARVINSN_trace_opt_aref,
14855 YARVINSN_trace_opt_aset,
14856 YARVINSN_trace_opt_aset_with,
14857 YARVINSN_trace_opt_aref_with,
14858 YARVINSN_trace_opt_length,
14859 YARVINSN_trace_opt_size,
14860 YARVINSN_trace_opt_empty_p,
14861 YARVINSN_trace_opt_succ,
14862 YARVINSN_trace_opt_not,
14863 YARVINSN_trace_opt_regexpmatch2,
14864 YARVINSN_trace_invokebuiltin,
14865 YARVINSN_trace_opt_invokebuiltin_delegate,
14866 YARVINSN_trace_opt_invokebuiltin_delegate_leave,
14867 YARVINSN_trace_getlocal_WC_0,
14868 YARVINSN_trace_getlocal_WC_1,
14869 YARVINSN_trace_setlocal_WC_0,
14870 YARVINSN_trace_setlocal_WC_1,
14871 YARVINSN_trace_putobject_INT2FIX_0_,
14872 YARVINSN_trace_putobject_INT2FIX_1_,
14873 VM_INSTRUCTION_SIZE
14874};
14875extern rb_method_definition_t *rb_method_definition_create(rb_method_type_t type, ID mid);
14876extern void rb_method_definition_set(const rb_method_entry_t *me, rb_method_definition_t *def, void *opts);
14877extern int rb_method_definition_eq(const rb_method_definition_t *d1, const rb_method_definition_t *d2);
14878extern VALUE rb_make_no_method_exception(VALUE exc, VALUE format, VALUE obj,
14879 int argc, const VALUE *argv, int priv);
14880static rb_control_frame_t *vm_get_ruby_level_caller_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
14881static VALUE
14882ruby_vm_special_exception_copy(VALUE exc)
14883{
14884 VALUE e = rb_obj_alloc(rb_class_real(RBASIC_CLASS(exc)));
14885 rb_obj_copy_ivar(e, exc);
14886 return e;
14887}
14888__attribute__((__noreturn__)) static void ec_stack_overflow(rb_execution_context_t *ec, int);
14889static void
14890ec_stack_overflow(rb_execution_context_t *ec, int setup)
14891{
14892 VALUE mesg = rb_ec_vm_ptr(ec)->special_exceptions[ruby_error_sysstack];
14893 ec->raised_flag = RAISED_STACKOVERFLOW;
14894 if (setup) {
14895 VALUE at = rb_ec_backtrace_object(ec);
14896 mesg = ruby_vm_special_exception_copy(mesg);
14897 rb_ivar_set(mesg, idBt, at);
14898 rb_ivar_set(mesg, idBt_locations, at);
14899 }
14900 ec->errinfo = mesg;
14901 rb_ec_tag_jump(ec, RUBY_TAG_RAISE);
14902}
14903__attribute__((__noreturn__)) static void vm_stackoverflow(void);
14904__attribute__((__noinline__)) static __attribute__((__cold__)) void vm_stackoverflow(void);
14905static void
14906vm_stackoverflow(void)
14907{
14908 ec_stack_overflow(rb_current_execution_context(1), 1);
14909}
14910__attribute__((__noreturn__)) static void rb_ec_stack_overflow(rb_execution_context_t *ec, int crit);
14911static void
14912rb_ec_stack_overflow(rb_execution_context_t *ec, int crit)
14913{
14914 if (rb_during_gc()) {
14915 rb_bug("system stack overflow during GC. Faulty native extension?");
14916 }
14917 if (crit) {
14918 ec->raised_flag = RAISED_STACKOVERFLOW;
14919 ec->errinfo = rb_ec_vm_ptr(ec)->special_exceptions[ruby_error_stackfatal];
14920 rb_ec_tag_jump(ec, RUBY_TAG_RAISE);
14921 }
14922 ec_stack_overflow(ec, 1);
14923}
14924__extension__ _Static_assert((-2) == -2, "VM_ENV_DATA_INDEX_ME_CREF" ": " "VM_ENV_DATA_INDEX_ME_CREF == -2");
14925__extension__ _Static_assert((-1) == -1, "VM_ENV_DATA_INDEX_SPECVAL" ": " "VM_ENV_DATA_INDEX_SPECVAL == -1");
14926__extension__ _Static_assert(( 0) == -0, "VM_ENV_DATA_INDEX_FLAGS" ": " "VM_ENV_DATA_INDEX_FLAGS == -0");
14927static void
14928vm_push_frame(rb_execution_context_t *ec,
14929 const rb_iseq_t *iseq,
14930 VALUE type,
14931 VALUE self,
14932 VALUE specval,
14933 VALUE cref_or_me,
14934 const VALUE *pc,
14935 VALUE *sp,
14936 int local_size,
14937 int stack_max)
14938{
14939 rb_control_frame_t *const cfp = ((ec->cfp)-1);
14940 ;
14941 ((void)0);
14942 do { __extension__ _Static_assert(sizeof(*(sp)) == sizeof(VALUE), "sizeof_sp" ": " "sizeof(*(sp)) == sizeof(VALUE)"); __extension__ _Static_assert(sizeof(*(cfp)) == sizeof(rb_control_frame_t), "sizeof_cfp" ": " "sizeof(*(cfp)) == sizeof(rb_control_frame_t)"); const struct rb_control_frame_struct *bound = (void *)&(sp)[(local_size + stack_max)]; if ((__builtin_expect(!!((cfp) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0);
14943 ;
14944 for (int i=0; i < local_size; i++) {
14945 *sp++ = ((VALUE)RUBY_Qnil);
14946 }
14947 *sp++ = cref_or_me;
14948 *sp++ = specval ;
14949 *sp++ = type;
14950 *cfp = (const struct rb_control_frame_struct) {
14951 .pc = pc,
14952 .sp = sp,
14953 .iseq = iseq,
14954 .self = self,
14955 .ep = sp - 1,
14956 .block_code = ((void *)0),
14957 .__bp__ = sp,
14958 .jit_return = ((void *)0)
14959 };
14960 ec->cfp = cfp;
14961 if (0 == 2) {
14962 rb_vmdebug_stack_dump_raw(rb_current_execution_context(1), rb_current_execution_context(1)->cfp);
14963 }
14964 ;
14965}
14966static inline int
14967vm_pop_frame(rb_execution_context_t *ec, rb_control_frame_t *cfp, const VALUE *ep)
14968{
14969 VALUE flags = ep[( 0)];
14970 if ((((0) > 0) ? (0) : 0) >= 4) rb_gc_verify_internal_consistency();
14971 if (0 == 2) rb_vmdebug_stack_dump_raw(rb_current_execution_context(1), rb_current_execution_context(1)->cfp);
14972 rb_vm_check_ints(ec);
14973 ec->cfp = ((cfp)+1);
14974 return flags & VM_FRAME_FLAG_FINISH;
14975}
14976static void
14977rb_vm_pop_frame(rb_execution_context_t *ec)
14978{
14979 vm_pop_frame(ec, ec->cfp, ec->cfp->ep);
14980}
14981static inline VALUE
14982rb_arity_error_new(int argc, int min, int max)
14983{
14984 VALUE err_mess = 0;
14985 if (min == max) {
14986 err_mess = rb_sprintf("wrong number of arguments (given %d, expected %d)", argc, min);
14987 }
14988 else if (max == (-1)) {
14989 err_mess = rb_sprintf("wrong number of arguments (given %d, expected %d+)", argc, min);
14990 }
14991 else {
14992 err_mess = rb_sprintf("wrong number of arguments (given %d, expected %d..%d)", argc, min, max);
14993 }
14994 return rb_exc_new_str(rb_eArgError, err_mess);
14995}
14996static void
14997rb_error_arity(int argc, int min, int max)
14998{
14999 rb_exc_raise(rb_arity_error_new(argc, min, max));
15000}
15001__attribute__((__noinline__)) static void vm_env_write_slowpath(const VALUE *ep, int index, VALUE v);
15002static void
15003vm_env_write_slowpath(const VALUE *ep, int index, VALUE v)
15004{
15005 rb_gc_writebarrier_remember(VM_ENV_ENVVAL(ep));
15006 VM_FORCE_WRITE(&ep[index], v);
15007 VM_ENV_FLAGS_UNSET(ep, VM_ENV_FLAG_WB_REQUIRED);
15008 ((void)0);
15009}
15010static inline void
15011vm_env_write(const VALUE *ep, int index, VALUE v)
15012{
15013 VALUE flags = ep[( 0)];
15014 if ((__builtin_expect(!!((flags & VM_ENV_FLAG_WB_REQUIRED) == 0), 1))) {
15015 VM_STACK_ENV_WRITE(ep, index, v);
15016 }
15017 else {
15018 vm_env_write_slowpath(ep, index, v);
15019 }
15020}
15021static VALUE
15022rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler)
15023{
15024 if (block_handler == 0) {
15025 return ((VALUE)RUBY_Qnil);
15026 }
15027 else {
15028 switch (vm_block_handler_type(block_handler)) {
15029 case block_handler_type_iseq:
15030 case block_handler_type_ifunc:
15031 return rb_vm_make_proc(ec, VM_BH_TO_CAPT_BLOCK(block_handler), rb_cProc);
15032 case block_handler_type_symbol:
15033 return rb_sym_to_proc(VM_BH_TO_SYMBOL(block_handler));
15034 case block_handler_type_proc:
15035 return VM_BH_TO_PROC(block_handler);
15036 default:
15037 __builtin_unreachable();
15038 }
15039 }
15040}
15041static inline struct vm_svar *
15042lep_svar(const rb_execution_context_t *ec, const VALUE *lep)
15043{
15044 VALUE svar;
15045 if (lep && (ec == ((void *)0) || ec->root_lep != lep)) {
15046 svar = lep[(-2)];
15047 }
15048 else {
15049 svar = ec->root_svar;
15050 }
15051 ((void)0);
15052 return (struct vm_svar *)svar;
15053}
15054static inline void
15055lep_svar_write(const rb_execution_context_t *ec, const VALUE *lep, const struct vm_svar *svar)
15056{
15057 ((void)0);
15058 if (lep && (ec == ((void *)0) || ec->root_lep != lep)) {
15059 vm_env_write(lep, (-2), (VALUE)svar);
15060 }
15061 else {
15062 rb_obj_write((VALUE)(rb_ec_thread_ptr(ec)->self), __extension__({
15063;
15064; __typeof__((VALUE *)(&ec->root_svar)) unaligned_member_access_result = ((VALUE *)(&ec->root_svar));
15065; unaligned_member_access_result; }), (VALUE)(svar), "./vm_insnhelper.c", 544);
15066 }
15067}
15068static VALUE
15069lep_svar_get(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key)
15070{
15071 const struct vm_svar *svar = lep_svar(ec, lep);
15072 if ((VALUE)svar == ((VALUE)RUBY_Qfalse) || imemo_type((VALUE)svar) != imemo_svar) return ((VALUE)RUBY_Qnil);
15073 switch (key) {
15074 case VM_SVAR_LASTLINE:
15075 return svar->lastline;
15076 case VM_SVAR_BACKREF:
15077 return svar->backref;
15078 default: {
15079 const VALUE ary = svar->others;
15080 if (RB_NIL_P(ary)) {
15081 return ((VALUE)RUBY_Qnil);
15082 }
15083 else {
15084 return rb_ary_entry(ary, key - VM_SVAR_EXTRA_START);
15085 }
15086 }
15087 }
15088}
15089static struct vm_svar *
15090svar_new(VALUE obj)
15091{
15092 return (struct vm_svar *)rb_imemo_new(imemo_svar, ((VALUE)RUBY_Qnil), ((VALUE)RUBY_Qnil), ((VALUE)RUBY_Qnil), obj);
15093}
15094static void
15095lep_svar_set(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key, VALUE val)
15096{
15097 struct vm_svar *svar = lep_svar(ec, lep);
15098 if ((VALUE)svar == ((VALUE)RUBY_Qfalse) || imemo_type((VALUE)svar) != imemo_svar) {
15099 lep_svar_write(ec, lep, svar = svar_new((VALUE)svar));
15100 }
15101 switch (key) {
15102 case VM_SVAR_LASTLINE:
15103 rb_obj_write((VALUE)(svar), __extension__({
15104;
15105; __typeof__((VALUE *)(&svar->lastline)) unaligned_member_access_result = ((VALUE *)(&svar->lastline));
15106; unaligned_member_access_result; }), (VALUE)(val), "./vm_insnhelper.c", 590);
15107 return;
15108 case VM_SVAR_BACKREF:
15109 rb_obj_write((VALUE)(svar), __extension__({
15110;
15111; __typeof__((VALUE *)(&svar->backref)) unaligned_member_access_result = ((VALUE *)(&svar->backref));
15112; unaligned_member_access_result; }), (VALUE)(val), "./vm_insnhelper.c", 593);
15113 return;
15114 default: {
15115 VALUE ary = svar->others;
15116 if (RB_NIL_P(ary)) {
15117 rb_obj_write((VALUE)(svar), __extension__({
15118 ;
15119 ; __typeof__((VALUE *)(&svar->others)) unaligned_member_access_result = ((VALUE *)(&svar->others));
15120 ; unaligned_member_access_result; }), (VALUE)(ary = rb_ary_new()), "./vm_insnhelper.c", 599);
15121 }
15122 rb_ary_store(ary, key - VM_SVAR_EXTRA_START, val);
15123 }
15124 }
15125}
15126static inline VALUE
15127vm_getspecial(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key, rb_num_t type)
15128{
15129 VALUE val;
15130 if (type == 0) {
15131 val = lep_svar_get(ec, lep, key);
15132 }
15133 else {
15134 VALUE backref = lep_svar_get(ec, lep, VM_SVAR_BACKREF);
15135 if (type & 0x01) {
15136 switch (type >> 1) {
15137 case '&':
15138 val = rb_reg_last_match(backref);
15139 break;
15140 case '`':
15141 val = rb_reg_match_pre(backref);
15142 break;
15143 case '\'':
15144 val = rb_reg_match_post(backref);
15145 break;
15146 case '+':
15147 val = rb_reg_match_last(backref);
15148 break;
15149 default:
15150 rb_bug("unexpected back-ref");
15151 }
15152 }
15153 else {
15154 val = rb_reg_nth_match((int)(type >> 1), backref);
15155 }
15156 }
15157 return val;
15158}
15159__attribute__((__pure__)) static rb_callable_method_entry_t *check_method_entry(VALUE obj, int can_be_svar);
15160static rb_callable_method_entry_t *
15161check_method_entry(VALUE obj, int can_be_svar)
15162{
15163 if (obj == ((VALUE)RUBY_Qfalse)) return ((void *)0);
15164 switch (imemo_type(obj)) {
15165 case imemo_ment:
15166 return (rb_callable_method_entry_t *)obj;
15167 case imemo_cref:
15168 return ((void *)0);
15169 case imemo_svar:
15170 if (can_be_svar) {
15171 return check_method_entry(((struct vm_svar *)obj)->cref_or_me, 0);
15172 }
15173 default:
15174 return ((void *)0);
15175 }
15176}
15177static const rb_callable_method_entry_t *
15178rb_vm_frame_method_entry(const rb_control_frame_t *cfp)
15179{
15180 const VALUE *ep = cfp->ep;
15181 rb_callable_method_entry_t *me;
15182 while (!VM_ENV_LOCAL_P(ep)) {
15183 if ((me = check_method_entry(ep[(-2)], 0)) != ((void *)0)) return me;
15184 ep = VM_ENV_PREV_EP(ep);
15185 }
15186 return check_method_entry(ep[(-2)], 1);
15187}
15188static const rb_iseq_t *
15189method_entry_iseqptr(const rb_callable_method_entry_t *me)
15190{
15191 switch (me->def->type) {
15192 case VM_METHOD_TYPE_ISEQ:
15193 return me->def->body.iseq.iseqptr;
15194 default:
15195 return ((void *)0);
15196 }
15197}
15198static rb_cref_t *
15199method_entry_cref(const rb_callable_method_entry_t *me)
15200{
15201 switch (me->def->type) {
15202 case VM_METHOD_TYPE_ISEQ:
15203 return me->def->body.iseq.cref;
15204 default:
15205 return ((void *)0);
15206 }
15207}
15208__attribute__((__pure__)) static rb_cref_t *check_cref(VALUE, int);
15209static rb_cref_t *
15210check_cref(VALUE obj, int can_be_svar)
15211{
15212 if (obj == ((VALUE)RUBY_Qfalse)) return ((void *)0);
15213 switch (imemo_type(obj)) {
15214 case imemo_ment:
15215 return method_entry_cref((rb_callable_method_entry_t *)obj);
15216 case imemo_cref:
15217 return (rb_cref_t *)obj;
15218 case imemo_svar:
15219 if (can_be_svar) {
15220 return check_cref(((struct vm_svar *)obj)->cref_or_me, 0);
15221 }
15222 default:
15223 return ((void *)0);
15224 }
15225}
15226static inline rb_cref_t *
15227vm_env_cref(const VALUE *ep)
15228{
15229 rb_cref_t *cref;
15230 while (!VM_ENV_LOCAL_P(ep)) {
15231 if ((cref = check_cref(ep[(-2)], 0)) != ((void *)0)) return cref;
15232 ep = VM_ENV_PREV_EP(ep);
15233 }
15234 return check_cref(ep[(-2)], 1);
15235}
15236static int
15237is_cref(const VALUE v, int can_be_svar)
15238{
15239 if (RB_TYPE_P(v, RUBY_T_IMEMO)) {
15240 switch (imemo_type(v)) {
15241 case imemo_cref:
15242 return 1;
15243 case imemo_svar:
15244 if (can_be_svar) return is_cref(((struct vm_svar *)v)->cref_or_me, 0);
15245 default:
15246 break;
15247 }
15248 }
15249 return 0;
15250}
15251static int
15252vm_env_cref_by_cref(const VALUE *ep)
15253{
15254 while (!VM_ENV_LOCAL_P(ep)) {
15255 if (is_cref(ep[(-2)], 0)) return 1;
15256 ep = VM_ENV_PREV_EP(ep);
15257 }
15258 return is_cref(ep[(-2)], 1);
15259}
15260static rb_cref_t *
15261cref_replace_with_duplicated_cref_each_frame(const VALUE *vptr, int can_be_svar, VALUE parent)
15262{
15263 const VALUE v = *vptr;
15264 rb_cref_t *cref, *new_cref;
15265 if (RB_TYPE_P(v, RUBY_T_IMEMO)) {
15266 switch (imemo_type(v)) {
15267 case imemo_cref:
15268 cref = (rb_cref_t *)v;
15269 new_cref = vm_cref_dup(cref);
15270 if (parent) {
15271 rb_obj_write((VALUE)(parent), __extension__({
15272 ;
15273 ; __typeof__((VALUE *)(vptr)) unaligned_member_access_result = ((VALUE *)(vptr));
15274 ; unaligned_member_access_result; }), (VALUE)(new_cref), "./vm_insnhelper.c", 785);
15275 }
15276 else {
15277 VM_FORCE_WRITE(vptr, (VALUE)new_cref);
15278 }
15279 return (rb_cref_t *)new_cref;
15280 case imemo_svar:
15281 if (can_be_svar) {
15282 return cref_replace_with_duplicated_cref_each_frame(&((struct vm_svar *)v)->cref_or_me, 0, v);
15283 }
15284 case imemo_ment:
15285 rb_bug("cref_replace_with_duplicated_cref_each_frame: unreachable");
15286 default:
15287 break;
15288 }
15289 }
15290 return 0;
15291}
15292static rb_cref_t *
15293vm_cref_replace_with_duplicated_cref(const VALUE *ep)
15294{
15295 if (vm_env_cref_by_cref(ep)) {
15296 rb_cref_t *cref;
15297 VALUE envval;
15298 while (!VM_ENV_LOCAL_P(ep)) {
15299 envval = VM_ENV_ESCAPED_P(ep) ? VM_ENV_ENVVAL(ep) : ((VALUE)RUBY_Qfalse);
15300 if ((cref = cref_replace_with_duplicated_cref_each_frame(&ep[(-2)], 0, envval)) != ((void *)0)) {
15301 return cref;
15302 }
15303 ep = VM_ENV_PREV_EP(ep);
15304 }
15305 envval = VM_ENV_ESCAPED_P(ep) ? VM_ENV_ENVVAL(ep) : ((VALUE)RUBY_Qfalse);
15306 return cref_replace_with_duplicated_cref_each_frame(&ep[(-2)], 1, envval);
15307 }
15308 else {
15309 rb_bug("vm_cref_dup: unreachable");
15310 }
15311}
15312static rb_cref_t *
15313vm_get_cref(const VALUE *ep)
15314{
15315 rb_cref_t *cref = vm_env_cref(ep);
15316 if (cref != ((void *)0)) {
15317 return cref;
15318 }
15319 else {
15320 rb_bug("vm_get_cref: unreachable");
15321 }
15322}static inline
15323rb_cref_t *
15324rb_vm_get_cref(const VALUE *ep)
15325{
15326 return vm_get_cref(ep);
15327}
15328static rb_cref_t *
15329vm_ec_cref(const rb_execution_context_t *ec)
15330{
15331 const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp);
15332 if (cfp == ((void *)0)) {
15333 return ((void *)0);
15334 }
15335 return vm_get_cref(cfp->ep);
15336}
15337static const rb_cref_t *
15338vm_get_const_key_cref(const VALUE *ep)
15339{
15340 const rb_cref_t *cref = vm_get_cref(ep);
15341 const rb_cref_t *key_cref = cref;
15342 while (cref) {
15343 if (RB_FL_TEST(CREF_CLASS(cref), ((VALUE)RUBY_FL_SINGLETON)) ||
15344 RB_FL_TEST(CREF_CLASS(cref), ((VALUE)RUBY_FL_USER1))) {
15345 return key_cref;
15346 }
15347 cref = CREF_NEXT(cref);
15348 }
15349 return ((void *)0);
15350}static inline
15351void
15352rb_vm_rewrite_cref(rb_cref_t *cref, VALUE old_klass, VALUE new_klass, rb_cref_t **new_cref_ptr)
15353{
15354 rb_cref_t *new_cref;
15355 while (cref) {
15356 if (CREF_CLASS(cref) == old_klass) {
15357 new_cref = vm_cref_new_use_prev(new_klass, METHOD_VISI_UNDEF, 0, cref, 0);
15358 *new_cref_ptr = new_cref;
15359 return;
15360 }
15361 new_cref = vm_cref_new_use_prev(CREF_CLASS(cref), METHOD_VISI_UNDEF, 0, cref, 0);
15362 cref = CREF_NEXT(cref);
15363 *new_cref_ptr = new_cref;
15364 new_cref_ptr = &new_cref->next;
15365 }
15366 *new_cref_ptr = ((void *)0);
15367}
15368static rb_cref_t *
15369vm_cref_push(const rb_execution_context_t *ec, VALUE klass, const VALUE *ep, int pushed_by_eval, int singleton)
15370{
15371 rb_cref_t *prev_cref = ((void *)0);
15372 if (ep) {
15373 prev_cref = vm_env_cref(ep);
15374 }
15375 else {
15376 rb_control_frame_t *cfp = vm_get_ruby_level_caller_cfp(ec, ec->cfp);
15377 if (cfp) {
15378 prev_cref = vm_env_cref(cfp->ep);
15379 }
15380 }
15381 return vm_cref_new(klass, METHOD_VISI_PUBLIC, 0, prev_cref, pushed_by_eval, singleton);
15382}
15383static inline VALUE
15384vm_get_cbase(const VALUE *ep)
15385{
15386 const rb_cref_t *cref = vm_get_cref(ep);
15387 return CREF_CLASS_FOR_DEFINITION(cref);
15388}
15389static inline VALUE
15390vm_get_const_base(const VALUE *ep)
15391{
15392 const rb_cref_t *cref = vm_get_cref(ep);
15393 while (cref) {
15394 if (!CREF_PUSHED_BY_EVAL(cref)) {
15395 return CREF_CLASS_FOR_DEFINITION(cref);
15396 }
15397 cref = CREF_NEXT(cref);
15398 }
15399 return ((VALUE)RUBY_Qundef);
15400}
15401static inline void
15402vm_check_if_namespace(VALUE klass)
15403{
15404 if (!RB_TYPE_P(klass, RUBY_T_CLASS) && !RB_TYPE_P(klass, RUBY_T_MODULE)) {
15405 rb_raise(rb_eTypeError, "%+""l""i" "\v"" is not a class/module", klass);
15406 }
15407}
15408static inline void
15409vm_ensure_not_refinement_module(VALUE self)
15410{
15411 if (RB_TYPE_P(self, RUBY_T_MODULE) && RB_FL_TEST(self, RMODULE_IS_REFINEMENT)) {
15412 rb_warn("not defined at the refinement, but at the outer class/module");
15413 }
15414}
15415static inline VALUE
15416vm_get_iclass(const rb_control_frame_t *cfp, VALUE klass)
15417{
15418 return klass;
15419}
15420static inline VALUE
15421vm_get_ev_const(rb_execution_context_t *ec, VALUE orig_klass, ID id, _Bool allow_nil, int is_defined)
15422{
15423 void rb_const_warn_if_deprecated(const rb_const_entry_t *ce, VALUE klass, ID id);
15424 VALUE val;
15425 if (RB_NIL_P(orig_klass) && allow_nil) {
15426 const rb_cref_t *root_cref = vm_get_cref(ec->cfp->ep);
15427 const rb_cref_t *cref;
15428 VALUE klass = ((VALUE)RUBY_Qnil);
15429 while (root_cref && CREF_PUSHED_BY_EVAL(root_cref)) {
15430 root_cref = CREF_NEXT(root_cref);
15431 }
15432 cref = root_cref;
15433 while (cref && CREF_NEXT(cref)) {
15434 if (CREF_PUSHED_BY_EVAL(cref)) {
15435 klass = ((VALUE)RUBY_Qnil);
15436 }
15437 else {
15438 klass = CREF_CLASS(cref);
15439 }
15440 cref = CREF_NEXT(cref);
15441 if (!RB_NIL_P(klass)) {
15442 VALUE av, am = 0;
15443 rb_const_entry_t *ce;
15444 search_continue:
15445 if ((ce = rb_const_lookup(klass, id))) {
15446 rb_const_warn_if_deprecated(ce, klass, id);
15447 val = ce->value;
15448 if (val == ((VALUE)RUBY_Qundef)) {
15449 if (am == klass) break;
15450 am = klass;
15451 if (is_defined) return 1;
15452 if (rb_autoloading_value(klass, id, &av, ((void *)0))) return av;
15453 rb_autoload_load(klass, id);
15454 goto search_continue;
15455 }
15456 else {
15457 if (is_defined) {
15458 return 1;
15459 }
15460 else {
15461 if ((__builtin_expect(!!(!rb_ractor_main_p()), 0))) {
15462 if (!rb_ractor_shareable_p(val)) {
15463 rb_raise(rb_eRactorIsolationError,
15464 "can not access non-shareable objects in constant %""l""i" "\v""::%s by non-main ractor.", rb_class_path(klass), rb_id2name(id));
15465 }
15466 }
15467 return val;
15468 }
15469 }
15470 }
15471 }
15472 }
15473 if (root_cref && !RB_NIL_P(CREF_CLASS(root_cref))) {
15474 klass = vm_get_iclass(ec->cfp, CREF_CLASS(root_cref));
15475 }
15476 else {
15477 klass = rb_class_of(ec->cfp->self);
15478 }
15479 if (is_defined) {
15480 return rb_const_defined(klass, id);
15481 }
15482 else {
15483 return rb_const_get(klass, id);
15484 }
15485 }
15486 else {
15487 vm_check_if_namespace(orig_klass);
15488 if (is_defined) {
15489 return rb_public_const_defined_from(orig_klass, id);
15490 }
15491 else {
15492 return rb_public_const_get_from(orig_klass, id);
15493 }
15494 }
15495}
15496static inline VALUE
15497vm_get_cvar_base(const rb_cref_t *cref, const rb_control_frame_t *cfp, int top_level_raise)
15498{
15499 VALUE klass;
15500 if (!cref) {
15501 rb_bug("vm_get_cvar_base: no cref");
15502 }
15503 while (CREF_NEXT(cref) &&
15504 (RB_NIL_P(CREF_CLASS(cref)) || RB_FL_TEST(CREF_CLASS(cref), ((VALUE)RUBY_FL_SINGLETON)) ||
15505 CREF_PUSHED_BY_EVAL(cref) || CREF_SINGLETON(cref))) {
15506 cref = CREF_NEXT(cref);
15507 }
15508 if (top_level_raise && !CREF_NEXT(cref)) {
15509 rb_raise(rb_eRuntimeError, "class variable access from toplevel");
15510 }
15511 klass = vm_get_iclass(cfp, CREF_CLASS(cref));
15512 if (RB_NIL_P(klass)) {
15513 rb_raise(rb_eTypeError, "no class variables available");
15514 }
15515 return klass;
15516}
15517static VALUE
15518vm_search_const_defined_class(const VALUE cbase, ID id)
15519{
15520 if (rb_const_defined_at(cbase, id)) return cbase;
15521 if (cbase == rb_cObject) {
15522 VALUE tmp = RCLASS_SUPER(cbase);
15523 while (tmp) {
15524 if (rb_const_defined_at(tmp, id)) return tmp;
15525 tmp = RCLASS_SUPER(tmp);
15526 }
15527 }
15528 return 0;
15529}
15530static _Bool
15531iv_index_tbl_lookup(struct st_table *iv_index_tbl, ID id, struct rb_iv_index_tbl_entry **ent)
15532{
15533 int found;
15534 st_data_t ent_data;
15535 if (iv_index_tbl == ((void *)0)) return 0;
15536 { unsigned int _lev; rb_vm_lock_enter(&_lev, "./vm_insnhelper.c", 1090);;
15537 {
15538 found = rb_st_lookup(iv_index_tbl, (st_data_t)id, &ent_data);
15539 }
15540 rb_vm_lock_leave(&_lev, "./vm_insnhelper.c", 1094); };
15541 if (found) *ent = (struct rb_iv_index_tbl_entry *)ent_data;
15542 return found ? 1 : 0;
15543}
15544__attribute__ ((__always_inline__)) static void fill_ivar_cache(const rb_iseq_t *iseq, IVC ic, const struct rb_callcache *cc, int is_attr, struct rb_iv_index_tbl_entry *ent);
15545static inline void
15546fill_ivar_cache(const rb_iseq_t *iseq, IVC ic, const struct rb_callcache *cc, int is_attr, struct rb_iv_index_tbl_entry *ent)
15547{
15548 if (!is_attr) {
15549 ic->entry = ent;
15550 (rb_obj_written((VALUE)(iseq), (VALUE)(((VALUE)RUBY_Qundef)), (VALUE)(ent->class_value), "./vm_insnhelper.c", 1108));
15551 }
15552 else {
15553 vm_cc_attr_index_set(cc, ent->index);
15554 }
15555}
15556__attribute__ ((__always_inline__)) static VALUE vm_getivar(VALUE, ID, const rb_iseq_t *, IVC, const struct rb_callcache *, int);
15557static inline VALUE
15558vm_getivar(VALUE obj, ID id, const rb_iseq_t *iseq, IVC ic, const struct rb_callcache *cc, int is_attr)
15559{
15560 VALUE val = ((VALUE)RUBY_Qundef);
15561 if (RB_SPECIAL_CONST_P(obj)) {
15562 }
15563 else if ((__builtin_expect(!!(is_attr ? (!!(vm_cc_attr_index_p(cc))) : (!!(ic->entry && ic->entry->class_serial == (((struct RClass *)(((struct RBasic *)(obj))->klass))->class_serial)))), 1))) {
15564 uint32_t index = !is_attr ? ic->entry->index: (vm_cc_attr_index(cc));
15565 ((void)0);
15566 if ((__builtin_expect(!!(RB_BUILTIN_TYPE(obj) == RUBY_T_OBJECT), 1)) &&
15567 (__builtin_expect(!!(index < ROBJECT_NUMIV(obj)), 1))) {
15568 val = ROBJECT_IVPTR(obj)[index];
15569 ((void)0);
15570 }
15571 else if (RB_FL_TEST_RAW(obj, ((VALUE)RUBY_FL_EXIVAR))) {
15572 val = rb_ivar_generic_lookup_with_index(obj, id, index);
15573 }
15574 goto ret;
15575 }
15576 else {
15577 struct rb_iv_index_tbl_entry *ent;
15578 if (RB_BUILTIN_TYPE(obj) == RUBY_T_OBJECT) {
15579 struct st_table *iv_index_tbl = ROBJECT_IV_INDEX_TBL_inline(obj);
15580 if (iv_index_tbl && iv_index_tbl_lookup(iv_index_tbl, id, &ent)) {
15581 fill_ivar_cache(iseq, ic, cc, is_attr, ent);
15582 if (ent->index < ROBJECT_NUMIV(obj)) {
15583 val = ROBJECT_IVPTR(obj)[ent->index];
15584 ((void)0);
15585 }
15586 }
15587 }
15588 else if (RB_FL_TEST_RAW(obj, ((VALUE)RUBY_FL_EXIVAR))) {
15589 struct st_table *iv_index_tbl = (((rb_classext_t *)((char *)(rb_obj_class(obj)) + sizeof(struct RClass)))->iv_index_tbl);
15590 if (iv_index_tbl && iv_index_tbl_lookup(iv_index_tbl, id, &ent)) {
15591 fill_ivar_cache(iseq, ic, cc, is_attr, ent);
15592 val = rb_ivar_generic_lookup_with_index(obj, id, ent->index);
15593 }
15594 }
15595 else {
15596 goto general_path;
15597 }
15598 ret:
15599 if ((__builtin_expect(!!(val != ((VALUE)RUBY_Qundef)), 1))) {
15600 return val;
15601 }
15602 else {
15603 return ((VALUE)RUBY_Qnil);
15604 }
15605 }
15606 general_path:
15607 ((void)0);
15608 if (is_attr) {
15609 return rb_attr_get(obj, id);
15610 }
15611 else {
15612 return rb_ivar_get(obj, id);
15613 }
15614}
15615__attribute__ ((__always_inline__)) static VALUE vm_setivar_slowpath(VALUE obj, ID id, VALUE val, const rb_iseq_t *iseq, IVC ic, const struct rb_callcache *cc, int is_attr);
15616__attribute__((__noinline__)) static VALUE vm_setivar_slowpath_ivar(VALUE obj, ID id, VALUE val, const rb_iseq_t *iseq, IVC ic);
15617__attribute__((__noinline__)) static VALUE vm_setivar_slowpath_attr(VALUE obj, ID id, VALUE val, const struct rb_callcache *cc);
15618static VALUE
15619vm_setivar_slowpath(VALUE obj, ID id, VALUE val, const rb_iseq_t *iseq, IVC ic, const struct rb_callcache *cc, int is_attr)
15620{
15621 do { VALUE frozen_obj = (obj); if ((__builtin_expect(!!(RB_OBJ_FROZEN(frozen_obj)), 0))) { rb_error_frozen_object(frozen_obj); } } while (0);
15622 if (RB_TYPE_P(obj, RUBY_T_OBJECT)) {
15623 struct st_table *iv_index_tbl = ROBJECT_IV_INDEX_TBL_inline(obj);
15624 struct rb_iv_index_tbl_entry *ent;
15625 if (iv_index_tbl_lookup(iv_index_tbl, id, &ent)) {
15626 if (!is_attr) {
15627 ic->entry = ent;
15628 (rb_obj_written((VALUE)(iseq), (VALUE)(((VALUE)RUBY_Qundef)), (VALUE)(ent->class_value), "./vm_insnhelper.c", 1212));
15629 }
15630 else if (ent->index >= 0x7fffffff) {
15631 rb_raise(rb_eArgError, "too many instance variables");
15632 }
15633 else {
15634 vm_cc_attr_index_set(cc, (int)(ent->index));
15635 }
15636 uint32_t index = ent->index;
15637 if ((__builtin_expect(!!(index >= ROBJECT_NUMIV(obj)), 0))) {
15638 rb_init_iv_list(obj);
15639 }
15640 VALUE *ptr = ROBJECT_IVPTR(obj);
15641 rb_obj_write((VALUE)(obj), __extension__({
15642 ;
15643 ; __typeof__((VALUE *)(&ptr[index])) unaligned_member_access_result = ((VALUE *)(&ptr[index]));
15644 ; unaligned_member_access_result; }), (VALUE)(val), "./vm_insnhelper.c", 1227);
15645 ((void)0);
15646 return val;
15647 }
15648 }
15649 ((void)0);
15650 return rb_ivar_set(obj, id, val);
15651}
15652static VALUE
15653vm_setivar_slowpath_ivar(VALUE obj, ID id, VALUE val, const rb_iseq_t *iseq, IVC ic)
15654{
15655 return vm_setivar_slowpath(obj, id, val, iseq, ic, ((void *)0), 0);
15656}
15657static VALUE
15658vm_setivar_slowpath_attr(VALUE obj, ID id, VALUE val, const struct rb_callcache *cc)
15659{
15660 return vm_setivar_slowpath(obj, id, val, ((void *)0), ((void *)0), cc, 1);
15661}
15662static inline VALUE
15663vm_setivar(VALUE obj, ID id, VALUE val, const rb_iseq_t *iseq, IVC ic, const struct rb_callcache *cc, int is_attr)
15664{
15665 if ((__builtin_expect(!!(RB_TYPE_P(obj, RUBY_T_OBJECT)), 1)) &&
15666 (__builtin_expect(!!(!RB_OBJ_FROZEN_RAW(obj)), 1))) {
15667 ((void)0);
15668 if ((__builtin_expect(!!((!is_attr && (!!(ic->entry && ic->entry->class_serial == (((struct RClass *)(((struct RBasic *)(obj))->klass))->class_serial)))) || ( is_attr && (!!(vm_cc_attr_index_p(cc))))), 1))) {
15669 uint32_t index = !is_attr ? ic->entry->index : vm_cc_attr_index(cc);
15670 if ((__builtin_expect(!!(index >= ROBJECT_NUMIV(obj)), 0))) {
15671 rb_init_iv_list(obj);
15672 }
15673 VALUE *ptr = ROBJECT_IVPTR(obj);
15674 rb_obj_write((VALUE)(obj), __extension__({
15675 ;
15676 ; __typeof__((VALUE *)(&ptr[index])) unaligned_member_access_result = ((VALUE *)(&ptr[index]));
15677 ; unaligned_member_access_result; }), (VALUE)(val), "./vm_insnhelper.c", 1268);
15678 ((void)0);
15679 return val;
15680 }
15681 }
15682 else {
15683 ((void)0);
15684 }
15685 if (is_attr) {
15686 return vm_setivar_slowpath_attr(obj, id, val, cc);
15687 }
15688 else {
15689 return vm_setivar_slowpath_ivar(obj, id, val, iseq, ic);
15690 }
15691}
15692static VALUE
15693update_classvariable_cache(const rb_iseq_t *iseq, VALUE klass, ID id, ICVARC ic)
15694{
15695 VALUE defined_class = 0;
15696 VALUE cvar_value = rb_cvar_find(klass, id, &defined_class);
15697 if (RB_TYPE_P(defined_class, RUBY_T_ICLASS)) {
15698 defined_class = ((struct RBasic *)(defined_class))->klass;
15699 }
15700 struct rb_id_table *rb_cvc_tbl = (((rb_classext_t *)((char *)(defined_class) + sizeof(struct RClass)))->cvc_tbl);
15701 if (!rb_cvc_tbl) {
15702 rb_bug("the cvc table should be set");
15703 }
15704 VALUE ent_data;
15705 if (!rb_id_table_lookup(rb_cvc_tbl, id, &ent_data)) {
15706 rb_bug("should have cvar cache entry");
15707 }
15708 struct rb_cvar_class_tbl_entry *ent = (void *)ent_data;
15709 ent->global_cvar_state = (ruby_vm_global_cvar_state);
15710 ic->entry = ent;
15711 (rb_obj_written((VALUE)(iseq), (VALUE)(((VALUE)RUBY_Qundef)), (VALUE)(ent->class_value), "./vm_insnhelper.c", 1309));
15712 return cvar_value;
15713}
15714static inline VALUE
15715vm_getclassvariable(const rb_iseq_t *iseq, const rb_control_frame_t *reg_cfp, ID id, ICVARC ic)
15716{
15717 const rb_cref_t *cref;
15718 if (ic->entry && ic->entry->global_cvar_state == (ruby_vm_global_cvar_state)) {
15719 VALUE v = ((VALUE)RUBY_Qundef);
15720 ((void)0);
15721 if (rb_st_lookup((((rb_classext_t *)((char *)(ic->entry->class_value) + sizeof(struct RClass)))->iv_tbl), (st_data_t)id, &v) &&
15722 (__builtin_expect(!!(rb_ractor_main_p()), 1))) {
15723 return v;
15724 }
15725 }
15726 cref = vm_get_cref(((((reg_cfp)->ep))));
15727 VALUE klass = vm_get_cvar_base(cref, reg_cfp, 1);
15728 return update_classvariable_cache(iseq, klass, id, ic);
15729}static inline
15730VALUE
15731rb_vm_getclassvariable(const rb_iseq_t *iseq, const rb_control_frame_t *cfp, ID id, ICVARC ic)
15732{
15733 return vm_getclassvariable(iseq, cfp, id, ic);
15734}
15735static inline void
15736vm_setclassvariable(const rb_iseq_t *iseq, const rb_control_frame_t *reg_cfp, ID id, VALUE val, ICVARC ic)
15737{
15738 const rb_cref_t *cref;
15739 if (ic->entry && ic->entry->global_cvar_state == (ruby_vm_global_cvar_state)) {
15740 ((void)0);
15741 rb_class_ivar_set(ic->entry->class_value, id, val);
15742 return;
15743 }
15744 cref = vm_get_cref(((((reg_cfp)->ep))));
15745 VALUE klass = vm_get_cvar_base(cref, reg_cfp, 1);
15746 rb_cvar_set(klass, id, val);
15747 update_classvariable_cache(iseq, klass, id, ic);
15748}static inline
15749void
15750rb_vm_setclassvariable(const rb_iseq_t *iseq, const rb_control_frame_t *cfp, ID id, VALUE val, ICVARC ic)
15751{
15752 vm_setclassvariable(iseq, cfp, id, val, ic);
15753}
15754static inline VALUE
15755vm_getinstancevariable(const rb_iseq_t *iseq, VALUE obj, ID id, IVC ic)
15756{
15757 return vm_getivar(obj, id, iseq, ic, ((void *)0), 0);
15758}
15759static inline void
15760vm_setinstancevariable(const rb_iseq_t *iseq, VALUE obj, ID id, VALUE val, IVC ic)
15761{
15762 vm_setivar(obj, id, val, iseq, ic, 0, 0);
15763}static inline
15764void
15765rb_vm_setinstancevariable(const rb_iseq_t *iseq, VALUE obj, ID id, VALUE val, IVC ic)
15766{
15767 vm_setinstancevariable(iseq, obj, id, val, ic);
15768}static inline
15769VALUE
15770rb_vm_set_ivar_idx(VALUE obj, uint32_t index, VALUE val)
15771{
15772 ((void)0);
15773 do { VALUE frozen_obj = (obj); if ((__builtin_expect(!!(RB_OBJ_FROZEN(frozen_obj)), 0))) { rb_error_frozen_object(frozen_obj); } } while (0);
15774 ((void)0);
15775 if ((__builtin_expect(!!(index >= ROBJECT_NUMIV(obj)), 0))) {
15776 rb_init_iv_list(obj);
15777 }
15778 VALUE *ptr = ROBJECT_IVPTR(obj);
15779 rb_obj_write((VALUE)(obj), __extension__({
15780 ;
15781 ; __typeof__((VALUE *)(&ptr[index])) unaligned_member_access_result = ((VALUE *)(&ptr[index]));
15782 ; unaligned_member_access_result; }), (VALUE)(val), "./vm_insnhelper.c", 1403);
15783 return val;
15784}
15785static VALUE
15786vm_throw_continue(const rb_execution_context_t *ec, VALUE err)
15787{
15788 if (RB_FIXNUM_P(err)) {
15789 ec->tag->state = RB_FIX2INT(err);
15790 }
15791 else if (RB_SYMBOL_P(err)) {
15792 ec->tag->state = RUBY_TAG_THROW;
15793 }
15794 else if (imemo_throw_data_p((VALUE)err)) {
15795 ec->tag->state = THROW_DATA_STATE((struct vm_throw_data *)err);
15796 }
15797 else {
15798 ec->tag->state = RUBY_TAG_RAISE;
15799 }
15800 return err;
15801}
15802static VALUE
15803vm_throw_start(const rb_execution_context_t *ec, rb_control_frame_t *const reg_cfp, enum ruby_tag_type state,
15804 const int flag, const VALUE throwobj)
15805{
15806 const rb_control_frame_t *escape_cfp = ((void *)0);
15807 const rb_control_frame_t * const eocfp = RUBY_VM_END_CONTROL_FRAME(ec);
15808 if (flag != 0) {
15809 }
15810 else if (state == RUBY_TAG_BREAK) {
15811 int is_orphan = 1;
15812 const VALUE *ep = ((((reg_cfp)->ep)));
15813 const rb_iseq_t *base_iseq = ((((reg_cfp)))->iseq);
15814 escape_cfp = reg_cfp;
15815 while (((base_iseq)->body)->type != ISEQ_TYPE_BLOCK) {
15816 if (((escape_cfp->iseq)->body)->type == ISEQ_TYPE_CLASS) {
15817 escape_cfp = ((escape_cfp)+1);
15818 ep = escape_cfp->ep;
15819 base_iseq = escape_cfp->iseq;
15820 }
15821 else {
15822 ep = VM_ENV_PREV_EP(ep);
15823 base_iseq = ((base_iseq)->body)->parent_iseq;
15824 escape_cfp = rb_vm_search_cf_from_ep(ec, escape_cfp, ep);
15825 ((void)0);
15826 }
15827 }
15828 if (VM_FRAME_LAMBDA_P(escape_cfp)) {
15829 is_orphan = 0;
15830 state = RUBY_TAG_RETURN;
15831 }
15832 else {
15833 ep = VM_ENV_PREV_EP(ep);
15834 while (escape_cfp < eocfp) {
15835 if (escape_cfp->ep == ep) {
15836 const rb_iseq_t *const iseq = escape_cfp->iseq;
15837 const VALUE epc = escape_cfp->pc - ((iseq)->body)->iseq_encoded;
15838 const struct iseq_catch_table *const ct = ((iseq)->body)->catch_table;
15839 unsigned int i;
15840 if (!ct) break;
15841 for (i=0; i < ct->size; i++) {
15842 const struct iseq_catch_table_entry *const entry =
15843 __extension__({
15844 ;
15845 ; __typeof__(&(ct)->entries[i]) unaligned_member_access_result = (&(ct)->entries[i]);
15846 ; unaligned_member_access_result; });
15847 if (entry->type == CATCH_TYPE_BREAK &&
15848 entry->iseq == base_iseq &&
15849 entry->start < epc && entry->end >= epc) {
15850 if (entry->cont == epc) {
15851 is_orphan = 0;
15852 }
15853 break;
15854 }
15855 }
15856 break;
15857 }
15858 escape_cfp = ((escape_cfp)+1);
15859 }
15860 }
15861 if (is_orphan) {
15862 rb_vm_localjump_error("break from proc-closure", throwobj, RUBY_TAG_BREAK);
15863 }
15864 }
15865 else if (state == RUBY_TAG_RETRY) {
15866 const VALUE *ep = VM_ENV_PREV_EP(((((reg_cfp)->ep))));
15867 escape_cfp = rb_vm_search_cf_from_ep(ec, reg_cfp, ep);
15868 }
15869 else if (state == RUBY_TAG_RETURN) {
15870 const VALUE *current_ep = ((((reg_cfp)->ep)));
15871 const VALUE *target_ep = ((void *)0), *target_lep, *ep = current_ep;
15872 int in_class_frame = 0;
15873 int toplevel = 1;
15874 escape_cfp = reg_cfp;
15875 while (!VM_ENV_LOCAL_P(ep)) {
15876 if (VM_ENV_FLAGS(ep, VM_FRAME_FLAG_LAMBDA) && target_ep == ((void *)0)) {
15877 target_ep = ep;
15878 }
15879 ep = VM_ENV_PREV_EP(ep);
15880 }
15881 target_lep = ep;
15882 while (escape_cfp < eocfp) {
15883 const VALUE *lep = VM_CF_LEP(escape_cfp);
15884 if (!target_lep) {
15885 target_lep = lep;
15886 }
15887 if (lep == target_lep &&
15888 VM_FRAME_RUBYFRAME_P(escape_cfp) &&
15889 ((escape_cfp->iseq)->body)->type == ISEQ_TYPE_CLASS) {
15890 in_class_frame = 1;
15891 target_lep = 0;
15892 }
15893 if (lep == target_lep) {
15894 if (VM_FRAME_LAMBDA_P(escape_cfp)) {
15895 toplevel = 0;
15896 if (in_class_frame) {
15897 goto valid_return;
15898 }
15899 else {
15900 const VALUE *tep = current_ep;
15901 while (target_lep != tep) {
15902 if (escape_cfp->ep == tep) {
15903 if (tep == target_ep) {
15904 goto valid_return;
15905 }
15906 else {
15907 goto unexpected_return;
15908 }
15909 }
15910 tep = VM_ENV_PREV_EP(tep);
15911 }
15912 }
15913 }
15914 else if (VM_FRAME_RUBYFRAME_P(escape_cfp)) {
15915 switch (((escape_cfp->iseq)->body)->type) {
15916 case ISEQ_TYPE_TOP:
15917 case ISEQ_TYPE_MAIN:
15918 if (toplevel) {
15919 if (in_class_frame) goto unexpected_return;
15920 if (target_ep == ((void *)0)) {
15921 goto valid_return;
15922 }
15923 else {
15924 goto unexpected_return;
15925 }
15926 }
15927 break;
15928 case ISEQ_TYPE_EVAL:
15929 case ISEQ_TYPE_CLASS:
15930 toplevel = 0;
15931 break;
15932 default:
15933 break;
15934 }
15935 }
15936 }
15937 if (escape_cfp->ep == target_lep && ((escape_cfp->iseq)->body)->type == ISEQ_TYPE_METHOD) {
15938 if (target_ep == ((void *)0)) {
15939 goto valid_return;
15940 }
15941 else {
15942 goto unexpected_return;
15943 }
15944 }
15945 escape_cfp = ((escape_cfp)+1);
15946 }
15947 unexpected_return:;
15948 rb_vm_localjump_error("unexpected return", throwobj, RUBY_TAG_RETURN);
15949 valid_return:;
15950 }
15951 else {
15952 rb_bug("isns(throw): unsupported throw type");
15953 }
15954 ec->tag->state = state;
15955 return (VALUE)THROW_DATA_NEW(throwobj, escape_cfp, state);
15956}
15957static VALUE
15958vm_throw(const rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
15959 rb_num_t throw_state, VALUE throwobj)
15960{
15961 const int state = (int)(throw_state & VM_THROW_STATE_MASK);
15962 const int flag = (int)(throw_state & VM_THROW_NO_ESCAPE_FLAG);
15963 if (state != 0) {
15964 return vm_throw_start(ec, reg_cfp, state, flag, throwobj);
15965 }
15966 else {
15967 return vm_throw_continue(ec, throwobj);
15968 }
15969}
15970static inline void
15971vm_expandarray(VALUE *sp, VALUE ary, rb_num_t num, int flag)
15972{
15973 int is_splat = flag & 0x01;
15974 rb_num_t space_size = num + is_splat;
15975 VALUE *base = sp - 1;
15976 const VALUE *ptr;
15977 rb_num_t len;
15978 const VALUE obj = ary;
15979 if (!RB_TYPE_P(ary, RUBY_T_ARRAY) && RB_NIL_P(ary = rb_check_array_type(ary))) {
15980 ary = obj;
15981 ptr = &ary;
15982 len = 1;
15983 }
15984 else {
15985 ptr = rb_array_const_ptr_transient(ary);
15986 len = (rb_num_t)rb_array_len(ary);
15987 }
15988 if (space_size == 0) {
15989 }
15990 else if (flag & 0x02) {
15991 rb_num_t i = 0, j;
15992 if (len < num) {
15993 for (i=0; i<num-len; i++) {
15994 *base++ = ((VALUE)RUBY_Qnil);
15995 }
15996 }
15997 for (j=0; i<num; i++, j++) {
15998 VALUE v = ptr[len - j - 1];
15999 *base++ = v;
16000 }
16001 if (is_splat) {
16002 *base = rb_ary_new_from_values(len - j, ptr);
16003 }
16004 }
16005 else {
16006 rb_num_t i;
16007 VALUE *bptr = &base[space_size - 1];
16008 for (i=0; i<num; i++) {
16009 if (len <= i) {
16010 for (; i<num; i++) {
16011 *bptr-- = ((VALUE)RUBY_Qnil);
16012 }
16013 break;
16014 }
16015 *bptr-- = ptr[i];
16016 }
16017 if (is_splat) {
16018 if (num > len) {
16019 *bptr = rb_ary_new();
16020 }
16021 else {
16022 *bptr = rb_ary_new_from_values(len - num, ptr + num);
16023 }
16024 }
16025 }
16026 (*__extension__ ({ volatile VALUE *rb_gc_guarded_ptr = &(ary); __asm__("" : : "m"(rb_gc_guarded_ptr)); rb_gc_guarded_ptr; }));
16027}
16028static VALUE vm_call_general(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling);
16029static VALUE vm_mtbl_dump(VALUE klass, ID target_mid);
16030static struct rb_class_cc_entries *
16031vm_ccs_create(VALUE klass, const rb_callable_method_entry_t *cme)
16032{
16033 struct rb_class_cc_entries *ccs = ((struct rb_class_cc_entries *)ruby_xmalloc(sizeof(struct rb_class_cc_entries)));
16034 ccs->capa = 0;
16035 ccs->len = 0;
16036 rb_obj_write((VALUE)(klass), __extension__({
16037 ;
16038 ; __typeof__((VALUE *)(&ccs->cme)) unaligned_member_access_result = ((VALUE *)(&ccs->cme));
16039 ; unaligned_member_access_result; }), (VALUE)(cme), "./vm_insnhelper.c", 1700);
16040 (((rb_callable_method_entry_t *)cme)->flags |= ((VALUE)RUBY_FL_USER8));
16041 ccs->entries = ((void *)0);
16042 return ccs;
16043}
16044static void
16045vm_ccs_push(VALUE klass, struct rb_class_cc_entries *ccs, const struct rb_callinfo *ci, const struct rb_callcache *cc)
16046{
16047 if (! vm_cc_markable(cc)) {
16048 return;
16049 }
16050 else if (! vm_ci_markable(ci)) {
16051 return;
16052 }
16053 if ((__builtin_expect(!!(ccs->len == ccs->capa), 0))) {
16054 if (ccs->capa == 0) {
16055 ccs->capa = 1;
16056 ccs->entries = ((struct rb_class_cc_entries_entry *)ruby_xmalloc2((ccs->capa), sizeof(struct rb_class_cc_entries_entry)));
16057 }
16058 else {
16059 ccs->capa *= 2;
16060 ((ccs->entries) = ((struct rb_class_cc_entries_entry *)ruby_xrealloc2((void *)(ccs->entries), (ccs->capa), sizeof(struct rb_class_cc_entries_entry))));
16061 }
16062 }
16063 ((void)0);
16064 const int pos = ccs->len++;
16065 rb_obj_write((VALUE)(klass), __extension__({
16066 ;
16067 ; __typeof__((VALUE *)(&ccs->entries[pos].ci)) unaligned_member_access_result = ((VALUE *)(&ccs->entries[pos].ci));
16068 ; unaligned_member_access_result; }), (VALUE)(ci), "./vm_insnhelper.c", 1729);
16069 rb_obj_write((VALUE)(klass), __extension__({
16070 ;
16071 ; __typeof__((VALUE *)(&ccs->entries[pos].cc)) unaligned_member_access_result = ((VALUE *)(&ccs->entries[pos].cc));
16072 ; unaligned_member_access_result; }), (VALUE)(cc), "./vm_insnhelper.c", 1730);
16073 if (0) {
16074 }
16075}
16076static const struct rb_callcache *
16077vm_search_method_slowpath0(VALUE cd_owner, struct rb_call_data *cd, VALUE klass)
16078{
16079 const struct rb_callcache *cc = rb_vm_search_method_slowpath(cd->ci, klass);
16080 cd->cc = cc;
16081 const struct rb_callcache *empty_cc =
16082 rb_vm_empty_cc();
16083 if (cd_owner && cc != empty_cc) (rb_obj_written((VALUE)(cd_owner), (VALUE)(((VALUE)RUBY_Qundef)), (VALUE)(cc), "./vm_insnhelper.c", 1912));
16084 ((void)0);
16085 return cc;
16086}
16087static const struct rb_callcache *
16088vm_search_method_fastpath(VALUE cd_owner, struct rb_call_data *cd, VALUE klass)
16089{
16090 const struct rb_callcache *cc = cd->cc;
16091 if ((__builtin_expect(!!(vm_cc_class_check(cc, klass)), 1))) {
16092 if ((__builtin_expect(!!(!((vm_cc_cme(cc))->flags & ((VALUE)RUBY_FL_USER9))), 1))) {
16093 ((void)0);
16094 ((void)0);
16095 ((void)0);
16096 return cc;
16097 }
16098 ((void)0);
16099 }
16100 else {
16101 ((void)0);
16102 }
16103 return vm_search_method_slowpath0(cd_owner, cd, klass);
16104}
16105static const struct rb_callcache *
16106vm_search_method(VALUE cd_owner, struct rb_call_data *cd, VALUE recv)
16107{
16108 VALUE klass = rb_class_of(recv);
16109 ((void)0);
16110 ((void)0);
16111 return vm_search_method_fastpath(cd_owner, cd, klass);
16112}
16113static inline int
16114check_cfunc(const rb_callable_method_entry_t *me, VALUE (*func)())
16115{
16116 if (! me) {
16117 return 0;
16118 }
16119 else {
16120 ((void)0);
16121 ((void)0);
16122 ((void)0);
16123 if (me->def->type != VM_METHOD_TYPE_CFUNC) {
16124 return 0;
16125 }
16126 else {
16127 return me->def->body.cfunc.func == func;
16128 }
16129 }
16130}
16131static inline int
16132vm_method_cfunc_is(const rb_iseq_t *iseq, CALL_DATA cd, VALUE recv, VALUE (*func)())
16133{
16134 ((void)0);
16135 const struct rb_callcache *cc = vm_search_method((VALUE)iseq, cd, recv);
16136 return check_cfunc(vm_cc_cme(cc), func);
16137}
16138static inline _Bool
16139FIXNUM_2_P(VALUE a, VALUE b)
16140{
16141 long x = a;
16142 long y = b;
16143 long z = x & y & 1;
16144 return z == 1;
16145}
16146static inline _Bool
16147FLONUM_2_P(VALUE a, VALUE b)
16148{
16149 long x = a;
16150 long y = b;
16151 long z = ((x ^ 2) | (y ^ 2)) & 3;
16152 return !z;
16153}
16154static VALUE
16155opt_equality_specialized(VALUE recv, VALUE obj)
16156{
16157 if (FIXNUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 0))) == 0), 1)))) {
16158 goto compare_by_identity;
16159 }
16160 else if (FLONUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 1))) == 0), 1)))) {
16161 goto compare_by_identity;
16162 }
16163 else if (RB_STATIC_SYM_P(recv) && RB_STATIC_SYM_P(obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 6))) == 0), 1)))) {
16164 goto compare_by_identity;
16165 }
16166 else if (RB_SPECIAL_CONST_P(recv)) {
16167 }
16168 else if (RBASIC_CLASS(recv) == rb_cFloat && RB_FLOAT_TYPE_P(obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 1))) == 0), 1)))) {
16169 double a = rb_float_value_inline(recv);
16170 double b = rb_float_value_inline(obj);
16171 return ((a == b) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse));
16172 }
16173 else if (RBASIC_CLASS(recv) == rb_cString && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 2))) == 0), 1)))) {
16174 if (recv == obj) {
16175 return ((VALUE)RUBY_Qtrue);
16176 }
16177 else if (RB_TYPE_P(obj, RUBY_T_STRING)) {
16178 return rb_str_eql_internal(obj, recv);
16179 }
16180 }
16181 return ((VALUE)RUBY_Qundef);
16182 compare_by_identity:
16183 return ((recv == obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse));
16184}
16185static VALUE
16186opt_equality(const rb_iseq_t *cd_owner, VALUE recv, VALUE obj, CALL_DATA cd)
16187{
16188 ((void)0);
16189 VALUE val = opt_equality_specialized(recv, obj);
16190 if (val != ((VALUE)RUBY_Qundef)) return val;
16191 if (!vm_method_cfunc_is(cd_owner, cd, recv, rb_obj_equal)) {
16192 return ((VALUE)RUBY_Qundef);
16193 }
16194 else {
16195 return ((recv == obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse));
16196 }
16197}
16198extern VALUE rb_vm_call0(rb_execution_context_t *ec, VALUE, ID, int, const VALUE*, const rb_callable_method_entry_t *, int kw_splat);
16199extern VALUE rb_vm_call_with_refinements(rb_execution_context_t *, VALUE, ID, int, const VALUE *, int);
16200static VALUE
16201check_match(rb_execution_context_t *ec, VALUE pattern, VALUE target, enum vm_check_match_type type)
16202{
16203 switch (type) {
16204 case VM_CHECKMATCH_TYPE_WHEN:
16205 return pattern;
16206 case VM_CHECKMATCH_TYPE_RESCUE:
16207 if (!rb_obj_is_kind_of(pattern, rb_cModule)) {
16208 rb_raise(rb_eTypeError, "class or module required for rescue clause");
16209 }
16210 case VM_CHECKMATCH_TYPE_CASE: {
16211 return rb_vm_call_with_refinements(ec, pattern, idEqq, 1, &target, 0);
16212 }
16213 default:
16214 rb_bug("check_match: unreachable");
16215 }
16216}
16217static inline VALUE
16218double_cmp_lt(double a, double b)
16219{
16220 ;
16221 return ((a < b) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse));
16222}
16223static inline VALUE
16224double_cmp_le(double a, double b)
16225{
16226 ;
16227 return ((a <= b) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse));
16228}
16229static inline VALUE
16230double_cmp_gt(double a, double b)
16231{
16232 ;
16233 return ((a > b) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse));
16234}
16235static inline VALUE
16236double_cmp_ge(double a, double b)
16237{
16238 ;
16239 return ((a >= b) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse));
16240}
16241static inline VALUE *
16242vm_base_ptr(const rb_control_frame_t *cfp)
16243{
16244 return cfp->__bp__;
16245}
16246__attribute__((__noreturn__)) static void raise_argument_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const VALUE exc);
16247__attribute__((__noreturn__)) static void argument_arity_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const int miss_argc, const int min_argc, const int max_argc);
16248__attribute__((__noreturn__)) static void argument_kw_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const char *error, const VALUE keys);
16249VALUE rb_keyword_error_new(const char *error, VALUE keys);
16250static VALUE method_missing(rb_execution_context_t *ec, VALUE obj, ID id, int argc, const VALUE *argv,
16251 enum method_missing_reason call_status, int kw_splat);
16252__attribute__ ((__visibility__("default"))) extern
16253const rb_callable_method_entry_t *rb_resolve_refined_method_callable(VALUE refinements, const rb_callable_method_entry_t *me);
16254struct args_info {
16255 VALUE *argv;
16256 int argc;
16257 int rest_index;
16258 int rest_dupped;
16259 const struct rb_callinfo_kwarg *kw_arg;
16260 VALUE *kw_argv;
16261 VALUE rest;
16262};
16263enum arg_setup_type {
16264 arg_setup_method,
16265 arg_setup_block
16266};
16267static inline void
16268arg_rest_dup(struct args_info *args)
16269{
16270 if (!args->rest_dupped) {
16271 args->rest = rb_ary_dup(args->rest);
16272 args->rest_dupped = 1;
16273 }
16274}
16275static inline int
16276args_argc(struct args_info *args)
16277{
16278 if (args->rest == ((VALUE)RUBY_Qfalse)) {
16279 return args->argc;
16280 }
16281 else {
16282 return args->argc + RARRAY_LENINT(args->rest) - args->rest_index;
16283 }
16284}
16285static inline void
16286args_extend(struct args_info *args, const int min_argc)
16287{
16288 int i;
16289 if (args->rest) {
16290 arg_rest_dup(args);
16291 ((void)0);
16292 for (i=args->argc + RARRAY_LENINT(args->rest); i<min_argc; i++) {
16293 rb_ary_push(args->rest, ((VALUE)RUBY_Qnil));
16294 }
16295 }
16296 else {
16297 for (i=args->argc; i<min_argc; i++) {
16298 args->argv[args->argc++] = ((VALUE)RUBY_Qnil);
16299 }
16300 }
16301}
16302static inline void
16303args_reduce(struct args_info *args, int over_argc)
16304{
16305 if (args->rest) {
16306 const long len = rb_array_len(args->rest);
16307 if (len > over_argc) {
16308 arg_rest_dup(args);
16309 rb_ary_resize(args->rest, len - over_argc);
16310 return;
16311 }
16312 else {
16313 args->rest = ((VALUE)RUBY_Qfalse);
16314 over_argc -= len;
16315 }
16316 }
16317 ((void)0);
16318 args->argc -= over_argc;
16319}
16320static inline int
16321args_check_block_arg0(struct args_info *args)
16322{
16323 VALUE ary = ((VALUE)RUBY_Qnil);
16324 if (args->rest && rb_array_len(args->rest) == 1) {
16325 VALUE arg0 = RARRAY_AREF(args->rest, 0);
16326 ary = rb_check_array_type(arg0);
16327 }
16328 else if (args->argc == 1) {
16329 VALUE arg0 = args->argv[0];
16330 ary = rb_check_array_type(arg0);
16331 args->argv[0] = arg0;
16332 }
16333 if (!RB_NIL_P(ary)) {
16334 args->rest = ary;
16335 args->rest_index = 0;
16336 args->argc = 0;
16337 return 1;
16338 }
16339 return 0;
16340}
16341static inline void
16342args_copy(struct args_info *args)
16343{
16344 if (args->rest != ((VALUE)RUBY_Qfalse)) {
16345 int argc = args->argc;
16346 args->argc = 0;
16347 arg_rest_dup(args);
16348 while (args->rest_index > 0 && argc > 0) {
16349 RARRAY_ASET(args->rest, --args->rest_index, args->argv[--argc]);
16350 }
16351 while (argc > 0) {
16352 rb_ary_unshift(args->rest, args->argv[--argc]);
16353 }
16354 }
16355 else if (args->argc > 0) {
16356 args->rest = rb_ary_new_from_values(args->argc, args->argv);
16357 args->rest_index = 0;
16358 args->rest_dupped = 1;
16359 args->argc = 0;
16360 }
16361}
16362static inline const VALUE *
16363args_rest_argv(struct args_info *args)
16364{
16365 return rb_array_const_ptr_transient(args->rest) + args->rest_index;
16366}
16367static inline VALUE
16368args_rest_array(struct args_info *args)
16369{
16370 VALUE ary;
16371 if (args->rest) {
16372 ary = rb_ary_behead(args->rest, args->rest_index);
16373 args->rest_index = 0;
16374 args->rest = 0;
16375 }
16376 else {
16377 ary = rb_ary_new();
16378 }
16379 return ary;
16380}
16381static int
16382args_kw_argv_to_hash(struct args_info *args)
16383{
16384 const struct rb_callinfo_kwarg *kw_arg = args->kw_arg;
16385 const VALUE *const passed_keywords = kw_arg->keywords;
16386 const int kw_len = kw_arg->keyword_len;
16387 VALUE h = rb_hash_new_with_size(kw_len);
16388 const int kw_start = args->argc - kw_len;
16389 const VALUE * const kw_argv = args->argv + kw_start;
16390 int i;
16391 args->argc = kw_start + 1;
16392 for (i=0; i<kw_len; i++) {
16393 rb_hash_aset(h, passed_keywords[i], kw_argv[i]);
16394 }
16395 args->argv[args->argc - 1] = h;
16396 return args->argc;
16397}
16398static inline void
16399args_setup_lead_parameters(struct args_info *args, int argc, VALUE *locals)
16400{
16401 if (args->argc >= argc) {
16402 args->argc -= argc;
16403 args->argv += argc;
16404 }
16405 else {
16406 int i, j;
16407 const VALUE *argv = args_rest_argv(args);
16408 for (i=args->argc, j=0; i<argc; i++, j++) {
16409 locals[i] = argv[j];
16410 }
16411 args->rest_index += argc - args->argc;
16412 args->argc = 0;
16413 }
16414}
16415static inline void
16416args_setup_post_parameters(struct args_info *args, int argc, VALUE *locals)
16417{
16418 long len;
16419 len = rb_array_len(args->rest);
16420 ruby_nonempty_memcpy((locals), (rb_array_const_ptr_transient(args->rest) + len - argc), rbimpl_size_mul_or_raise(sizeof(VALUE), (argc)));
16421 rb_ary_resize(args->rest, len - argc);
16422}
16423static inline int
16424args_setup_opt_parameters(struct args_info *args, int opt_max, VALUE *locals)
16425{
16426 int i;
16427 if (args->argc >= opt_max) {
16428 args->argc -= opt_max;
16429 args->argv += opt_max;
16430 i = opt_max;
16431 }
16432 else {
16433 int j;
16434 i = args->argc;
16435 args->argc = 0;
16436 if (args->rest) {
16437 int len = RARRAY_LENINT(args->rest);
16438 const VALUE *argv = rb_array_const_ptr_transient(args->rest);
16439 for (; i<opt_max && args->rest_index < len; i++, args->rest_index++) {
16440 locals[i] = argv[args->rest_index];
16441 }
16442 }
16443 for (j=i; j<opt_max; j++) {
16444 locals[j] = ((VALUE)RUBY_Qnil);
16445 }
16446 }
16447 return i;
16448}
16449static inline void
16450args_setup_rest_parameter(struct args_info *args, VALUE *locals)
16451{
16452 *locals = args_rest_array(args);
16453}
16454static VALUE
16455make_unknown_kw_hash(const VALUE *passed_keywords, int passed_keyword_len, const VALUE *kw_argv)
16456{
16457 int i;
16458 VALUE obj = rb_ary_tmp_new(1);
16459 for (i=0; i<passed_keyword_len; i++) {
16460 if (kw_argv[i] != ((VALUE)RUBY_Qundef)) {
16461 rb_ary_push(obj, passed_keywords[i]);
16462 }
16463 }
16464 return obj;
16465}
16466static VALUE
16467make_rest_kw_hash(const VALUE *passed_keywords, int passed_keyword_len, const VALUE *kw_argv)
16468{
16469 int i;
16470 VALUE obj = rb_hash_new_with_size(passed_keyword_len);
16471 for (i=0; i<passed_keyword_len; i++) {
16472 if (kw_argv[i] != ((VALUE)RUBY_Qundef)) {
16473 rb_hash_aset(obj, passed_keywords[i], kw_argv[i]);
16474 }
16475 }
16476 return obj;
16477}
16478static inline int
16479args_setup_kw_parameters_lookup(const ID key, VALUE *ptr, const VALUE *const passed_keywords, VALUE *passed_values, const int passed_keyword_len)
16480{
16481 int i;
16482 const VALUE keyname = rb_id2sym(key);
16483 for (i=0; i<passed_keyword_len; i++) {
16484 if (keyname == passed_keywords[i]) {
16485 *ptr = passed_values[i];
16486 passed_values[i] = ((VALUE)RUBY_Qundef);
16487 return 1;
16488 }
16489 }
16490 return 0;
16491}
16492static void
16493args_setup_kw_parameters(rb_execution_context_t *const ec, const rb_iseq_t *const iseq,
16494 VALUE *const passed_values, const int passed_keyword_len, const VALUE *const passed_keywords,
16495 VALUE *const locals)
16496{
16497 const ID *acceptable_keywords = ((iseq)->body)->param.keyword->table;
16498 const int req_key_num = ((iseq)->body)->param.keyword->required_num;
16499 const int key_num = ((iseq)->body)->param.keyword->num;
16500 const VALUE * const default_values = ((iseq)->body)->param.keyword->default_values;
16501 VALUE missing = 0;
16502 int i, di, found = 0;
16503 int unspecified_bits = 0;
16504 VALUE unspecified_bits_value = ((VALUE)RUBY_Qnil);
16505 for (i=0; i<req_key_num; i++) {
16506 ID key = acceptable_keywords[i];
16507 if (args_setup_kw_parameters_lookup(key, &locals[i], passed_keywords, passed_values, passed_keyword_len)) {
16508 found++;
16509 }
16510 else {
16511 if (!missing) missing = rb_ary_tmp_new(1);
16512 rb_ary_push(missing, rb_id2sym(key));
16513 }
16514 }
16515 if (missing) argument_kw_error(ec, iseq, "missing", missing);
16516 for (di=0; i<key_num; i++, di++) {
16517 if (args_setup_kw_parameters_lookup(acceptable_keywords[i], &locals[i], passed_keywords, passed_values, passed_keyword_len)) {
16518 found++;
16519 }
16520 else {
16521 if (default_values[di] == ((VALUE)RUBY_Qundef)) {
16522 locals[i] = ((VALUE)RUBY_Qnil);
16523 if ((__builtin_expect(!!(i < (32-1)), 1))) {
16524 unspecified_bits |= 0x01 << di;
16525 }
16526 else {
16527 if (RB_NIL_P(unspecified_bits_value)) {
16528 int j;
16529 unspecified_bits_value = rb_hash_new();
16530 for (j=0; j<(32-1); j++) {
16531 if (unspecified_bits & (0x01 << j)) {
16532 rb_hash_aset(unspecified_bits_value, __builtin_choose_expr( __builtin_constant_p(j), ((VALUE)(j)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(j)), ((VALUE)RUBY_Qtrue));
16533 }
16534 }
16535 }
16536 rb_hash_aset(unspecified_bits_value, __builtin_choose_expr( __builtin_constant_p(di), ((VALUE)(di)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(di)), ((VALUE)RUBY_Qtrue));
16537 }
16538 }
16539 else {
16540 locals[i] = default_values[di];
16541 }
16542 }
16543 }
16544 if (((iseq)->body)->param.flags.has_kwrest) {
16545 const int rest_hash_index = key_num + 1;
16546 locals[rest_hash_index] = make_rest_kw_hash(passed_keywords, passed_keyword_len, passed_values);
16547 }
16548 else {
16549 if (found != passed_keyword_len) {
16550 VALUE keys = make_unknown_kw_hash(passed_keywords, passed_keyword_len, passed_values);
16551 argument_kw_error(ec, iseq, "unknown", keys);
16552 }
16553 }
16554 if (RB_NIL_P(unspecified_bits_value)) {
16555 unspecified_bits_value = __builtin_choose_expr( __builtin_constant_p(unspecified_bits), ((VALUE)(unspecified_bits)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(unspecified_bits));
16556 }
16557 locals[key_num] = unspecified_bits_value;
16558}
16559static inline void
16560args_setup_kw_rest_parameter(VALUE keyword_hash, VALUE *locals, int kw_flag)
16561{
16562 if (RB_NIL_P(keyword_hash)) {
16563 keyword_hash = rb_hash_new();
16564 }
16565 else if (!(kw_flag & (0x01 << VM_CALL_KW_SPLAT_MUT_bit))) {
16566 keyword_hash = rb_hash_dup(keyword_hash);
16567 }
16568 locals[0] = keyword_hash;
16569}
16570static inline void
16571args_setup_block_parameter(const rb_execution_context_t *ec, struct rb_calling_info *calling, VALUE *locals)
16572{
16573 VALUE block_handler = calling->block_handler;
16574 *locals = rb_vm_bh_to_procval(ec, block_handler);
16575}
16576struct fill_values_arg {
16577 VALUE *keys;
16578 VALUE *vals;
16579 int argc;
16580};
16581static int
16582fill_keys_values(st_data_t key, st_data_t val, st_data_t ptr)
16583{
16584 struct fill_values_arg *arg = (struct fill_values_arg *)ptr;
16585 int i = arg->argc++;
16586 arg->keys[i] = (VALUE)key;
16587 arg->vals[i] = (VALUE)val;
16588 return ST_CONTINUE;
16589}
16590static inline int
16591ignore_keyword_hash_p(VALUE keyword_hash, const rb_iseq_t * const iseq, unsigned int * kw_flag, VALUE * converted_keyword_hash)
16592{
16593 if (!RB_TYPE_P(keyword_hash, RUBY_T_HASH)) {
16594 keyword_hash = rb_to_hash_type(keyword_hash);
16595 }
16596 if (!(*kw_flag & (0x01 << VM_CALL_KW_SPLAT_MUT_bit)) &&
16597 (((iseq)->body)->param.flags.has_kwrest ||
16598 ((iseq)->body)->param.flags.ruby2_keywords)) {
16599 *kw_flag |= (0x01 << VM_CALL_KW_SPLAT_MUT_bit);
16600 keyword_hash = rb_hash_dup(keyword_hash);
16601 }
16602 *converted_keyword_hash = keyword_hash;
16603 return !(((iseq)->body)->param.flags.has_kw) &&
16604 !(((iseq)->body)->param.flags.has_kwrest) &&
16605 RHASH_EMPTY_P(keyword_hash);
16606}
16607COLDFUNC static int
16608setup_parameters_complex(rb_execution_context_t * const ec, const rb_iseq_t * const iseq,
16609 struct rb_calling_info *const calling,
16610 const struct rb_callinfo *ci,
16611 VALUE * const locals, const enum arg_setup_type arg_setup_type) {
16612 const int min_argc = ((iseq)->body)->param.lead_num + ((iseq)->body)->param.post_num;
16613 const int max_argc = (((iseq)->body)->param.flags.has_rest == 0) ? min_argc + ((iseq)->body)->param.opt_num : (-1);
16614 int given_argc;
16615 unsigned int kw_flag = vm_ci_flag(ci) & ((0x01 << VM_CALL_KWARG_bit) | (0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_MUT_bit));
16616 int opt_pc = 0, allow_autosplat = !kw_flag;
16617 struct args_info args_body, *args;
16618 VALUE keyword_hash = ((VALUE)RUBY_Qnil);
16619 VALUE * const orig_sp = ec->cfp->sp;
16620 unsigned int i;
16621 VALUE flag_keyword_hash = 0;
16622 VALUE splat_flagged_keyword_hash = 0;
16623 VALUE converted_keyword_hash = 0;
16624 VALUE rest_last = 0;
16625 ;
16626 for (i=calling->argc; i<((iseq)->body)->param.size; i++) {
16627 locals[i] = ((VALUE)RUBY_Qnil);
16628 }
16629 ec->cfp->sp = &locals[i];
16630 args = &args_body;
16631 given_argc = args->argc = calling->argc;
16632 args->argv = locals;
16633 args->rest_dupped = 0;
16634 if (kw_flag & (0x01 << VM_CALL_KWARG_bit)) {
16635 args->kw_arg = vm_ci_kwarg(ci);
16636 if (((iseq)->body)->param.flags.has_kw) {
16637 int kw_len = args->kw_arg->keyword_len;
16638 args->kw_argv = ((VALUE *)__builtin_alloca (rbimpl_size_mul_or_raise(sizeof(VALUE), (kw_len))));
16639 args->argc -= kw_len;
16640 given_argc -= kw_len;
16641 ruby_nonempty_memcpy((args->kw_argv), (locals + args->argc), rbimpl_size_mul_or_raise(sizeof(VALUE), (kw_len)));
16642 }
16643 else {
16644 args->kw_argv = ((void *)0);
16645 given_argc = args_kw_argv_to_hash(args);
16646 kw_flag |= (0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_MUT_bit);
16647 }
16648 }
16649 else {
16650 args->kw_arg = ((void *)0);
16651 args->kw_argv = ((void *)0);
16652 }
16653 if (vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit)) {
16654 int len;
16655 args->rest = locals[--args->argc];
16656 args->rest_index = 0;
16657 len = RARRAY_LENINT(args->rest);
16658 given_argc += len - 1;
16659 rest_last = RARRAY_AREF(args->rest, len - 1);
16660 if (!kw_flag && len > 0) {
16661 if (RB_TYPE_P(rest_last, RUBY_T_HASH) &&
16662 (((struct RHash *)rest_last)->basic.flags & RHASH_PASS_AS_KEYWORDS)) {
16663 splat_flagged_keyword_hash = rest_last;
16664 rest_last = rb_hash_dup(rest_last);
16665 kw_flag |= (0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_MUT_bit);
16666 }
16667 else {
16668 rest_last = 0;
16669 }
16670 }
16671 if (kw_flag & (0x01 << VM_CALL_KW_SPLAT_bit)) {
16672 if (ignore_keyword_hash_p(rest_last, iseq, &kw_flag, &converted_keyword_hash)) {
16673 arg_rest_dup(args);
16674 rb_ary_pop(args->rest);
16675 given_argc--;
16676 kw_flag &= ~((0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_MUT_bit));
16677 }
16678 else {
16679 if (rest_last != converted_keyword_hash) {
16680 rest_last = converted_keyword_hash;
16681 arg_rest_dup(args);
16682 RARRAY_ASET(args->rest, len - 1, rest_last);
16683 }
16684 if (((iseq)->body)->param.flags.ruby2_keywords && rest_last) {
16685 flag_keyword_hash = rest_last;
16686 }
16687 else if (((iseq)->body)->param.flags.has_kw || ((iseq)->body)->param.flags.has_kwrest) {
16688 arg_rest_dup(args);
16689 rb_ary_pop(args->rest);
16690 given_argc--;
16691 keyword_hash = rest_last;
16692 }
16693 }
16694 }
16695 }
16696 else {
16697 if (kw_flag & (0x01 << VM_CALL_KW_SPLAT_bit)) {
16698 VALUE last_arg = args->argv[args->argc-1];
16699 if (ignore_keyword_hash_p(last_arg, iseq, &kw_flag, &converted_keyword_hash)) {
16700 args->argc--;
16701 given_argc--;
16702 kw_flag &= ~((0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_MUT_bit));
16703 }
16704 else {
16705 if (last_arg != converted_keyword_hash) {
16706 last_arg = converted_keyword_hash;
16707 args->argv[args->argc-1] = last_arg;
16708 }
16709 if (((iseq)->body)->param.flags.ruby2_keywords) {
16710 flag_keyword_hash = last_arg;
16711 }
16712 else if (((iseq)->body)->param.flags.has_kw || ((iseq)->body)->param.flags.has_kwrest) {
16713 args->argc--;
16714 given_argc--;
16715 keyword_hash = last_arg;
16716 }
16717 }
16718 }
16719 args->rest = ((VALUE)RUBY_Qfalse);
16720 }
16721 if (flag_keyword_hash && RB_TYPE_P(flag_keyword_hash, RUBY_T_HASH)) {
16722 ((struct RHash *)flag_keyword_hash)->basic.flags |= RHASH_PASS_AS_KEYWORDS;
16723 }
16724 if (kw_flag && ((iseq)->body)->param.flags.accepts_no_kwarg) {
16725 rb_raise(rb_eArgError, "no keywords accepted");
16726 }
16727 switch (arg_setup_type) {
16728 case arg_setup_method:
16729 break;
16730 case arg_setup_block:
16731 if (given_argc == (RB_NIL_P(keyword_hash) ? 1 : 2) &&
16732 allow_autosplat &&
16733 (min_argc > 0 || ((iseq)->body)->param.opt_num > 1) &&
16734 !((iseq)->body)->param.flags.ambiguous_param0 &&
16735 !((((iseq)->body)->param.flags.has_kw ||
16736 ((iseq)->body)->param.flags.has_kwrest)
16737 && max_argc == 1) &&
16738 args_check_block_arg0(args)) {
16739 given_argc = RARRAY_LENINT(args->rest);
16740 }
16741 break;
16742 }
16743 if (given_argc < min_argc) {
16744 if (arg_setup_type == arg_setup_block) {
16745 do { __extension__ _Static_assert(sizeof(*((ec->cfp)->sp)) == sizeof(VALUE), "sizeof_sp" ": " "sizeof(*((ec->cfp)->sp)) == sizeof(VALUE)"); __extension__ _Static_assert(sizeof(*((ec->cfp))) == sizeof(rb_control_frame_t), "sizeof_cfp" ": " "sizeof(*((ec->cfp))) == sizeof(rb_control_frame_t)"); const struct rb_control_frame_struct *bound = (void *)&((ec->cfp)->sp)[((min_argc))]; if ((__builtin_expect(!!(((ec->cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0);
16746 given_argc = min_argc;
16747 args_extend(args, min_argc);
16748 }
16749 else {
16750 argument_arity_error(ec, iseq, given_argc, min_argc, max_argc);
16751 }
16752 }
16753 if (given_argc > max_argc && max_argc != (-1)) {
16754 if (arg_setup_type == arg_setup_block) {
16755 args_reduce(args, given_argc - max_argc);
16756 given_argc = max_argc;
16757 }
16758 else {
16759 argument_arity_error(ec, iseq, given_argc, min_argc, max_argc);
16760 }
16761 }
16762 if (((iseq)->body)->param.flags.has_lead) {
16763 args_setup_lead_parameters(args, ((iseq)->body)->param.lead_num, locals + 0);
16764 }
16765 if (((iseq)->body)->param.flags.has_rest || ((iseq)->body)->param.flags.has_post){
16766 args_copy(args);
16767 }
16768 if (((iseq)->body)->param.flags.has_post) {
16769 args_setup_post_parameters(args, ((iseq)->body)->param.post_num, locals + ((iseq)->body)->param.post_start);
16770 }
16771 if (((iseq)->body)->param.flags.has_opt) {
16772 int opt = args_setup_opt_parameters(args, ((iseq)->body)->param.opt_num, locals + ((iseq)->body)->param.lead_num);
16773 opt_pc = (int)((iseq)->body)->param.opt_table[opt];
16774 }
16775 if (((iseq)->body)->param.flags.has_rest) {
16776 args_setup_rest_parameter(args, locals + ((iseq)->body)->param.rest_start);
16777 VALUE ary = *(locals + ((iseq)->body)->param.rest_start);
16778 VALUE index = rb_array_len(ary) - 1;
16779 if (splat_flagged_keyword_hash &&
16780 !((iseq)->body)->param.flags.ruby2_keywords &&
16781 !((iseq)->body)->param.flags.has_kw &&
16782 !((iseq)->body)->param.flags.has_kwrest &&
16783 RARRAY_AREF(ary, index) == splat_flagged_keyword_hash) {
16784 ((struct RHash *)rest_last)->basic.flags &= ~RHASH_PASS_AS_KEYWORDS;
16785 RARRAY_ASET(ary, index, rest_last);
16786 }
16787 }
16788 if (((iseq)->body)->param.flags.has_kw) {
16789 VALUE * const klocals = locals + ((iseq)->body)->param.keyword->bits_start - ((iseq)->body)->param.keyword->num;
16790 if (args->kw_argv != ((void *)0)) {
16791 const struct rb_callinfo_kwarg *kw_arg = args->kw_arg;
16792 args_setup_kw_parameters(ec, iseq, args->kw_argv, kw_arg->keyword_len, kw_arg->keywords, klocals);
16793 }
16794 else if (!RB_NIL_P(keyword_hash)) {
16795 int kw_len = rb_long2int_inline(RHASH_SIZE(keyword_hash));
16796 struct fill_values_arg arg;
16797 arg.keys = args->kw_argv = ((VALUE *)__builtin_alloca (rbimpl_size_mul_or_raise(sizeof(VALUE), (kw_len * 2))));
16798 arg.vals = arg.keys + kw_len;
16799 arg.argc = 0;
16800 rb_hash_foreach(keyword_hash, fill_keys_values, (VALUE)&arg);
16801 ((void)0);
16802 args_setup_kw_parameters(ec, iseq, arg.vals, kw_len, arg.keys, klocals);
16803 }
16804 else {
16805 ((void)0);
16806 args_setup_kw_parameters(ec, iseq, ((void *)0), 0, ((void *)0), klocals);
16807 }
16808 }
16809 else if (((iseq)->body)->param.flags.has_kwrest) {
16810 args_setup_kw_rest_parameter(keyword_hash, locals + ((iseq)->body)->param.keyword->rest_start, kw_flag);
16811 }
16812 else if (!RB_NIL_P(keyword_hash) && RHASH_SIZE(keyword_hash) > 0 && arg_setup_type == arg_setup_method) {
16813 argument_kw_error(ec, iseq, "unknown", rb_hash_keys(keyword_hash));
16814 }
16815 if (((iseq)->body)->param.flags.has_block) {
16816 if (((iseq)->body)->local_iseq == iseq) {
16817 }
16818 else {
16819 args_setup_block_parameter(ec, calling, locals + ((iseq)->body)->param.block_start);
16820 }
16821 }
16822 ec->cfp->sp = orig_sp;
16823 return opt_pc;
16824}
16825static void
16826raise_argument_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const VALUE exc)
16827{
16828 VALUE at;
16829 if (iseq) {
16830 vm_push_frame(ec, iseq, VM_FRAME_MAGIC_DUMMY | VM_ENV_FLAG_LOCAL, ((VALUE)RUBY_Qnil) ,
16831 0 , ((VALUE)RUBY_Qfalse) ,
16832 ((iseq)->body)->iseq_encoded,
16833 ec->cfp->sp, 0, 0 );
16834 at = rb_ec_backtrace_object(ec);
16835 rb_backtrace_use_iseq_first_lineno_for_last_location(at);
16836 rb_vm_pop_frame(ec);
16837 }
16838 else {
16839 at = rb_ec_backtrace_object(ec);
16840 }
16841 rb_ivar_set(exc, idBt_locations, at);
16842 rb_exc_set_backtrace(exc, at);
16843 rb_exc_raise(exc);
16844}
16845static void
16846argument_arity_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const int miss_argc, const int min_argc, const int max_argc)
16847{
16848 VALUE exc = rb_arity_error_new(miss_argc, min_argc, max_argc);
16849 if (((iseq)->body)->param.flags.has_kw) {
16850 const struct rb_iseq_param_keyword *const kw = ((iseq)->body)->param.keyword;
16851 const ID *keywords = kw->table;
16852 int req_key_num = kw->required_num;
16853 if (req_key_num > 0) {
16854 static const char required[] = "; required keywords";
16855 VALUE mesg = rb_attr_get(exc, idMesg);
16856 rb_str_resize(mesg, RSTRING_LEN(mesg)-1);
16857 rb_str_cat(mesg, required, sizeof(required) - 1 - (req_key_num == 1));
16858 ((__builtin_constant_p(":") ? rbimpl_str_cat_cstr : rb_str_cat_cstr) ((mesg), (":")));
16859 do {
16860 ((__builtin_constant_p(" ") ? rbimpl_str_cat_cstr : rb_str_cat_cstr) ((mesg), (" ")));
16861 rb_str_append(mesg, rb_id2str(*keywords++));
16862 ((__builtin_constant_p(",") ? rbimpl_str_cat_cstr : rb_str_cat_cstr) ((mesg), (",")));
16863 } while (--req_key_num);
16864 RSTRING_PTR(mesg)[RSTRING_LEN(mesg)-1] = ')';
16865 }
16866 }
16867 raise_argument_error(ec, iseq, exc);
16868}
16869static void
16870argument_kw_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const char *error, const VALUE keys)
16871{
16872 raise_argument_error(ec, iseq, rb_keyword_error_new(error, keys));
16873}
16874static inline void
16875vm_caller_setup_arg_splat(rb_control_frame_t *cfp, struct rb_calling_info *calling)
16876{
16877 int argc = calling->argc;
16878 VALUE *argv = cfp->sp - argc;
16879 VALUE ary = argv[argc-1];
16880 ;
16881 cfp->sp--;
16882 if (!RB_NIL_P(ary)) {
16883 const VALUE *ptr = rb_array_const_ptr_transient(ary);
16884 long len = rb_array_len(ary), i;
16885 do { __extension__ _Static_assert(sizeof(*((cfp)->sp)) == sizeof(VALUE), "sizeof_sp" ": " "sizeof(*((cfp)->sp)) == sizeof(VALUE)"); __extension__ _Static_assert(sizeof(*((cfp))) == sizeof(rb_control_frame_t), "sizeof_cfp" ": " "sizeof(*((cfp))) == sizeof(rb_control_frame_t)"); const struct rb_control_frame_struct *bound = (void *)&((cfp)->sp)[((len))]; if ((__builtin_expect(!!(((cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0);
16886 for (i = 0; i < len; i++) {
16887 *cfp->sp++ = ptr[i];
16888 }
16889 calling->argc += i - 1;
16890 }
16891}
16892static inline void
16893vm_caller_setup_arg_kw(rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_callinfo *ci)
16894{
16895 const VALUE *const passed_keywords = vm_ci_kwarg(ci)->keywords;
16896 const int kw_len = vm_ci_kwarg(ci)->keyword_len;
16897 const VALUE h = rb_hash_new_with_size(kw_len);
16898 VALUE *sp = cfp->sp;
16899 int i;
16900 for (i=0; i<kw_len; i++) {
16901 rb_hash_aset(h, passed_keywords[i], (sp - kw_len)[i]);
16902 }
16903 (sp-kw_len)[0] = h;
16904 cfp->sp -= kw_len - 1;
16905 calling->argc -= kw_len - 1;
16906 calling->kw_splat = 1;
16907}
16908static VALUE
16909vm_to_proc(VALUE proc)
16910{
16911 if ((__builtin_expect(!!(!rb_obj_is_proc(proc)), 0))) {
16912 VALUE b;
16913 const rb_callable_method_entry_t *me =
16914 rb_callable_method_entry_with_refinements(rb_class_of(proc), idTo_proc, ((void *)0));
16915 if (me) {
16916 b = rb_vm_call0(rb_current_execution_context(1), proc, idTo_proc, 0, ((void *)0), me, 0);
16917 }
16918 else {
16919 b = rb_check_convert_type_with_id(proc, RUBY_T_DATA, "Proc", idTo_proc);
16920 }
16921 if (RB_NIL_P(b) || !rb_obj_is_proc(b)) {
16922 rb_raise(rb_eTypeError,
16923 "wrong argument type %s (expected Proc)",
16924 rb_obj_classname(proc));
16925 }
16926 return b;
16927 }
16928 else {
16929 return proc;
16930 }
16931}
16932static VALUE
16933refine_sym_proc_call(VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg)
16934{
16935 VALUE obj;
16936 ID mid;
16937 const rb_callable_method_entry_t *me = 0;
16938 rb_execution_context_t *ec;
16939 const VALUE symbol = RARRAY_AREF(callback_arg, 0);
16940 const VALUE refinements = RARRAY_AREF(callback_arg, 1);
16941 int kw_splat = rb_keyword_given_p();
16942 VALUE klass;
16943 if (argc-- < 1) {
16944 rb_raise(rb_eArgError, "no receiver given");
16945 }
16946 obj = *argv++;
16947 mid = rb_sym2id(symbol);
16948 for (klass = rb_class_of(obj); klass; klass = RCLASS_SUPER(klass)) {
16949 me = rb_callable_method_entry(klass, mid);
16950 if (me) {
16951 me = rb_resolve_refined_method_callable(refinements, me);
16952 if (me) break;
16953 }
16954 }
16955 ec = rb_current_execution_context(1);
16956 if (!RB_NIL_P(blockarg)) {
16957 vm_passed_block_handler_set(ec, blockarg);
16958 }
16959 if (!me) {
16960 return method_missing(ec, obj, mid, argc, argv, MISSING_NOENTRY, kw_splat);
16961 }
16962 return rb_vm_call0(ec, obj, mid, argc, argv, me, kw_splat);
16963}
16964static VALUE
16965vm_caller_setup_arg_block(const rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
16966 const struct rb_callinfo *ci, const rb_iseq_t *blockiseq, const int is_super)
16967{
16968 if (vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_BLOCKARG_bit)) {
16969 VALUE block_code = *(--reg_cfp->sp);
16970 if (RB_NIL_P(block_code)) {
16971 return 0;
16972 }
16973 else if (block_code == rb_block_param_proxy) {
16974 ((void)0);
16975 VALUE handler = VM_CF_BLOCK_HANDLER(reg_cfp);
16976 reg_cfp->block_code = (const void *) handler;
16977 return handler;
16978 }
16979 else if (RB_SYMBOL_P(block_code) && rb_method_basic_definition_p(rb_cSymbol, idTo_proc)) {
16980 const rb_cref_t *cref = vm_env_cref(reg_cfp->ep);
16981 if (cref && !RB_NIL_P(cref->refinements)) {
16982 VALUE ref = cref->refinements;
16983 VALUE func = rb_hash_lookup(ref, block_code);
16984 if (RB_NIL_P(func)) {
16985 VALUE callback_arg = rb_ary_tmp_new(2);
16986 rb_ary_push(callback_arg, block_code);
16987 rb_ary_push(callback_arg, ref);
16988 RB_OBJ_FREEZE_RAW(callback_arg);
16989 func = rb_func_lambda_new(refine_sym_proc_call, callback_arg, 1, (-1));
16990 rb_hash_aset(ref, block_code, func);
16991 }
16992 block_code = func;
16993 }
16994 return block_code;
16995 }
16996 else {
16997 return vm_to_proc(block_code);
16998 }
16999 }
17000 else if (blockiseq != ((void *)0)) {
17001 struct rb_captured_block *captured = VM_CFP_TO_CAPTURED_BLOCK(reg_cfp);
17002 captured->code.iseq = blockiseq;
17003 return VM_BH_FROM_ISEQ_BLOCK(captured);
17004 }
17005 else {
17006 if (is_super) {
17007 return ((VM_EP_LEP(((((reg_cfp)->ep)))))[(-1)]);
17008 }
17009 else {
17010 return 0;
17011 }
17012 }
17013}
17014static inline VALUE vm_call_iseq_setup_2(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, int opt_pc, int param_size, int local_size);
17015__attribute__ ((__always_inline__)) static VALUE vm_call_iseq_setup_normal(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const rb_callable_method_entry_t *me, int opt_pc, int param_size, int local_size);
17016static inline VALUE vm_call_iseq_setup_tailcall(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, int opt_pc);
17017static VALUE vm_call_super_method(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling);
17018static VALUE vm_call_method_nome(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling);
17019static VALUE vm_call_method_each_type(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling);
17020static inline VALUE vm_call_method(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling);
17021static vm_call_handler vm_call_iseq_setup_func(const struct rb_callinfo *ci, const int param_size, const int local_size);
17022static VALUE
17023vm_call_iseq_setup_tailcall_0start(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
17024{
17025 ((void)0);
17026 return vm_call_iseq_setup_tailcall(ec, cfp, calling, 0);
17027}
17028static VALUE
17029vm_call_iseq_setup_normal_0start(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
17030{
17031 ((void)0);
17032 const struct rb_callcache *cc = calling->cc;
17033 const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def);
17034 int param = ((iseq)->body)->param.size;
17035 int local = ((iseq)->body)->local_table_size;
17036 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cc), 0, param, local);
17037}
17038static _Bool
17039rb_simple_iseq_p(const rb_iseq_t *iseq)
17040{
17041 return ((iseq)->body)->param.flags.has_opt == 0 &&
17042 ((iseq)->body)->param.flags.has_rest == 0 &&
17043 ((iseq)->body)->param.flags.has_post == 0 &&
17044 ((iseq)->body)->param.flags.has_kw == 0 &&
17045 ((iseq)->body)->param.flags.has_kwrest == 0 &&
17046 ((iseq)->body)->param.flags.accepts_no_kwarg == 0 &&
17047 ((iseq)->body)->param.flags.has_block == 0;
17048}static inline
17049__attribute__ ((__visibility__("default"))) _Bool
17050rb_iseq_only_optparam_p(const rb_iseq_t *iseq)
17051{
17052 return ((iseq)->body)->param.flags.has_opt == 1 &&
17053 ((iseq)->body)->param.flags.has_rest == 0 &&
17054 ((iseq)->body)->param.flags.has_post == 0 &&
17055 ((iseq)->body)->param.flags.has_kw == 0 &&
17056 ((iseq)->body)->param.flags.has_kwrest == 0 &&
17057 ((iseq)->body)->param.flags.accepts_no_kwarg == 0 &&
17058 ((iseq)->body)->param.flags.has_block == 0;
17059}static inline
17060__attribute__ ((__visibility__("default"))) _Bool
17061rb_iseq_only_kwparam_p(const rb_iseq_t *iseq)
17062{
17063 return ((iseq)->body)->param.flags.has_opt == 0 &&
17064 ((iseq)->body)->param.flags.has_rest == 0 &&
17065 ((iseq)->body)->param.flags.has_post == 0 &&
17066 ((iseq)->body)->param.flags.has_kw == 1 &&
17067 ((iseq)->body)->param.flags.has_kwrest == 0 &&
17068 ((iseq)->body)->param.flags.has_block == 0;
17069}
17070static _Bool
17071rb_splat_or_kwargs_p(const struct rb_callinfo *__restrict__ ci)
17072{
17073 return (vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit)) || (vm_ci_flag(ci) & ((0x01 << VM_CALL_KWARG_bit) | (0x01 << VM_CALL_KW_SPLAT_bit)));
17074}
17075static inline void
17076CALLER_SETUP_ARG(struct rb_control_frame_struct *__restrict__ cfp,
17077 struct rb_calling_info *__restrict__ calling,
17078 const struct rb_callinfo *__restrict__ ci)
17079{
17080 if ((__builtin_expect(!!((vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit))), 0))) {
17081 VALUE final_hash;
17082 vm_caller_setup_arg_splat(cfp, calling);
17083 if (!(vm_ci_flag(ci) & ((0x01 << VM_CALL_KWARG_bit) | (0x01 << VM_CALL_KW_SPLAT_bit))) &&
17084 calling->argc > 0 &&
17085 RB_TYPE_P((final_hash = *(cfp->sp - 1)), RUBY_T_HASH) &&
17086 (((struct RHash *)final_hash)->basic.flags & RHASH_PASS_AS_KEYWORDS)) {
17087 *(cfp->sp - 1) = rb_hash_dup(final_hash);
17088 calling->kw_splat = 1;
17089 }
17090 }
17091 if ((__builtin_expect(!!((vm_ci_flag(ci) & ((0x01 << VM_CALL_KWARG_bit) | (0x01 << VM_CALL_KW_SPLAT_bit)))), 0))) {
17092 if ((vm_ci_flag(ci) & (0x01 << VM_CALL_KWARG_bit))) {
17093 vm_caller_setup_arg_kw(cfp, calling, ci);
17094 }
17095 else {
17096 VALUE keyword_hash = cfp->sp[-1];
17097 if (!RB_TYPE_P(keyword_hash, RUBY_T_HASH)) {
17098 cfp->sp[-1] = rb_hash_dup(rb_to_hash_type(keyword_hash));
17099 }
17100 else if (!(vm_ci_flag(ci) & (0x01 << VM_CALL_KW_SPLAT_MUT_bit))) {
17101 cfp->sp[-1] = rb_hash_dup(keyword_hash);
17102 }
17103 }
17104 }
17105}
17106static inline void
17107CALLER_REMOVE_EMPTY_KW_SPLAT(struct rb_control_frame_struct *__restrict__ cfp,
17108 struct rb_calling_info *__restrict__ calling,
17109 const struct rb_callinfo *__restrict__ ci)
17110{
17111 if ((__builtin_expect(!!(calling->kw_splat), 0))) {
17112 if (RHASH_EMPTY_P(cfp->sp[-1])) {
17113 cfp->sp--;
17114 calling->argc--;
17115 calling->kw_splat = 0;
17116 }
17117 }
17118}
17119static VALUE
17120vm_call_iseq_setup_normal_opt_start(rb_execution_context_t *ec, rb_control_frame_t *cfp,
17121 struct rb_calling_info *calling)
17122{
17123 const struct rb_callcache *cc = calling->cc;
17124 const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def);
17125 const int lead_num = ((iseq)->body)->param.lead_num;
17126 const int opt = calling->argc - lead_num;
17127 const int opt_num = ((iseq)->body)->param.opt_num;
17128 const int opt_pc = (int)((iseq)->body)->param.opt_table[opt];
17129 const int param = ((iseq)->body)->param.size;
17130 const int local = ((iseq)->body)->local_table_size;
17131 const int delta = opt_num - opt;
17132 ((void)0);
17133 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cc), opt_pc, param - delta, local);
17134}
17135static VALUE
17136vm_call_iseq_setup_tailcall_opt_start(rb_execution_context_t *ec, rb_control_frame_t *cfp,
17137 struct rb_calling_info *calling)
17138{
17139 const struct rb_callcache *cc = calling->cc;
17140 const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def);
17141 const int lead_num = ((iseq)->body)->param.lead_num;
17142 const int opt = calling->argc - lead_num;
17143 const int opt_pc = (int)((iseq)->body)->param.opt_table[opt];
17144 ((void)0);
17145 return vm_call_iseq_setup_tailcall(ec, cfp, calling, opt_pc);
17146}
17147static void
17148args_setup_kw_parameters(rb_execution_context_t *const ec, const rb_iseq_t *const iseq,
17149 VALUE *const passed_values, const int passed_keyword_len, const VALUE *const passed_keywords,
17150 VALUE *const locals);
17151static VALUE
17152vm_call_iseq_setup_kwparm_kwarg(rb_execution_context_t *ec, rb_control_frame_t *cfp,
17153 struct rb_calling_info *calling)
17154{
17155 const struct rb_callinfo *ci = calling->ci;
17156 const struct rb_callcache *cc = calling->cc;
17157 ((void)0);
17158 ((void)0);
17159 const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def);
17160 const struct rb_iseq_param_keyword *kw_param = ((iseq)->body)->param.keyword;
17161 const struct rb_callinfo_kwarg *kw_arg = vm_ci_kwarg(ci);
17162 const int ci_kw_len = kw_arg->keyword_len;
17163 const VALUE * const ci_keywords = kw_arg->keywords;
17164 VALUE *argv = cfp->sp - calling->argc;
17165 VALUE *const klocals = argv + kw_param->bits_start - kw_param->num;
17166 const int lead_num = ((iseq)->body)->param.lead_num;
17167 VALUE * const ci_kws = ((VALUE *)__builtin_alloca (rbimpl_size_mul_or_raise(sizeof(VALUE), (ci_kw_len))));
17168 ruby_nonempty_memcpy((ci_kws), (argv + lead_num), rbimpl_size_mul_or_raise(sizeof(VALUE), (ci_kw_len)));
17169 args_setup_kw_parameters(ec, iseq, ci_kws, ci_kw_len, ci_keywords, klocals);
17170 int param = ((iseq)->body)->param.size;
17171 int local = ((iseq)->body)->local_table_size;
17172 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cc), 0, param, local);
17173}
17174static VALUE
17175vm_call_iseq_setup_kwparm_nokwarg(rb_execution_context_t *ec, rb_control_frame_t *cfp,
17176 struct rb_calling_info *calling)
17177{
17178 const struct rb_callinfo *__attribute__ ((__unused__)) ci = calling->ci;
17179 const struct rb_callcache *cc = calling->cc;
17180 ((void)0);
17181 ((void)0);
17182 const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def);
17183 const struct rb_iseq_param_keyword *kw_param = ((iseq)->body)->param.keyword;
17184 VALUE * const argv = cfp->sp - calling->argc;
17185 VALUE * const klocals = argv + kw_param->bits_start - kw_param->num;
17186 int i;
17187 for (i=0; i<kw_param->num; i++) {
17188 klocals[i] = kw_param->default_values[i];
17189 }
17190 klocals[i] = __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0));
17191 int param = ((iseq)->body)->param.size;
17192 int local = ((iseq)->body)->local_table_size;
17193 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cc), 0, param, local);
17194}
17195static inline int
17196vm_callee_setup_arg(rb_execution_context_t *ec, struct rb_calling_info *calling,
17197 const rb_iseq_t *iseq, VALUE *argv, int param_size, int local_size)
17198{
17199 const struct rb_callinfo *ci = calling->ci;
17200 const struct rb_callcache *cc = calling->cc;
17201 _Bool cacheable_ci = vm_ci_markable(ci);
17202 if ((__builtin_expect(!!(!(vm_ci_flag(ci) & (0x01 << VM_CALL_KW_SPLAT_bit))), 1))) {
17203 if ((__builtin_expect(!!(rb_simple_iseq_p(iseq)), 1))) {
17204 rb_control_frame_t *cfp = ec->cfp;
17205 CALLER_SETUP_ARG(cfp, calling, ci);
17206 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
17207 if (calling->argc != ((iseq)->body)->param.lead_num) {
17208 argument_arity_error(ec, iseq, calling->argc, ((iseq)->body)->param.lead_num, ((iseq)->body)->param.lead_num);
17209 }
17210 ((void)0);
17211 ((void)0);
17212 CC_SET_FASTPATH(cc, vm_call_iseq_setup_func(ci, param_size, local_size), cacheable_ci && vm_call_iseq_optimizable_p(ci, cc));
17213 return 0;
17214 }
17215 else if (rb_iseq_only_optparam_p(iseq)) {
17216 rb_control_frame_t *cfp = ec->cfp;
17217 CALLER_SETUP_ARG(cfp, calling, ci);
17218 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
17219 const int lead_num = ((iseq)->body)->param.lead_num;
17220 const int opt_num = ((iseq)->body)->param.opt_num;
17221 const int argc = calling->argc;
17222 const int opt = argc - lead_num;
17223 if (opt < 0 || opt > opt_num) {
17224 argument_arity_error(ec, iseq, argc, lead_num, lead_num + opt_num);
17225 }
17226 if ((__builtin_expect(!!(!(vm_ci_flag(ci) & (0x01 << VM_CALL_TAILCALL_bit))), 1))) {
17227 CC_SET_FASTPATH(cc, vm_call_iseq_setup_normal_opt_start,
17228 !(vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit)) && !(vm_ci_flag(ci) & (0x01 << VM_CALL_KWARG_bit)) &&
17229 cacheable_ci && !((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED));
17230 }
17231 else {
17232 CC_SET_FASTPATH(cc, vm_call_iseq_setup_tailcall_opt_start,
17233 !(vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit)) && !(vm_ci_flag(ci) & (0x01 << VM_CALL_KWARG_bit)) &&
17234 cacheable_ci && !((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED));
17235 }
17236 ((void)0);
17237 for (int i=argc; i<lead_num + opt_num; i++) {
17238 argv[i] = ((VALUE)RUBY_Qnil);
17239 }
17240 return (int)((iseq)->body)->param.opt_table[opt];
17241 }
17242 else if (rb_iseq_only_kwparam_p(iseq) && !(vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit))) {
17243 const int lead_num = ((iseq)->body)->param.lead_num;
17244 const int argc = calling->argc;
17245 const struct rb_iseq_param_keyword *kw_param = ((iseq)->body)->param.keyword;
17246 if (vm_ci_flag(ci) & (0x01 << VM_CALL_KWARG_bit)) {
17247 const struct rb_callinfo_kwarg *kw_arg = vm_ci_kwarg(ci);
17248 if (argc - kw_arg->keyword_len == lead_num) {
17249 const int ci_kw_len = kw_arg->keyword_len;
17250 const VALUE * const ci_keywords = kw_arg->keywords;
17251 VALUE * const ci_kws = ((VALUE *)__builtin_alloca (rbimpl_size_mul_or_raise(sizeof(VALUE), (ci_kw_len))));
17252 ruby_nonempty_memcpy((ci_kws), (argv + lead_num), rbimpl_size_mul_or_raise(sizeof(VALUE), (ci_kw_len)));
17253 VALUE *const klocals = argv + kw_param->bits_start - kw_param->num;
17254 args_setup_kw_parameters(ec, iseq, ci_kws, ci_kw_len, ci_keywords, klocals);
17255 CC_SET_FASTPATH(cc, vm_call_iseq_setup_kwparm_kwarg,
17256 cacheable_ci && !((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED));
17257 return 0;
17258 }
17259 }
17260 else if (argc == lead_num) {
17261 VALUE *const klocals = argv + kw_param->bits_start - kw_param->num;
17262 args_setup_kw_parameters(ec, iseq, ((void *)0), 0, ((void *)0), klocals);
17263 if (klocals[kw_param->num] == __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0))) {
17264 CC_SET_FASTPATH(cc, vm_call_iseq_setup_kwparm_nokwarg,
17265 cacheable_ci && !((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED));
17266 }
17267 return 0;
17268 }
17269 }
17270 }
17271 return setup_parameters_complex(ec, iseq, calling, ci, argv, arg_setup_method);
17272}
17273COLDFUNC static VALUE
17274vm_call_iseq_setup(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) {
17275 ((void)0);
17276 const struct rb_callcache *cc = calling->cc;
17277 const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def);
17278 const int param_size = ((iseq)->body)->param.size;
17279 const int local_size = ((iseq)->body)->local_table_size;
17280 const int opt_pc = vm_callee_setup_arg(ec, calling, def_iseq_ptr(vm_cc_cme(cc)->def), cfp->sp - calling->argc, param_size, local_size);
17281 return vm_call_iseq_setup_2(ec, cfp, calling, opt_pc, param_size, local_size);
17282}
17283COLDFUNC static VALUE
17284vm_call_iseq_setup_2(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling,
17285 int opt_pc, int param_size, int local_size) {
17286 const struct rb_callinfo *ci = calling->ci;
17287 const struct rb_callcache *cc = calling->cc;
17288 if ((__builtin_expect(!!(!(vm_ci_flag(ci) & (0x01 << VM_CALL_TAILCALL_bit))), 1))) {
17289 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cc), opt_pc, param_size, local_size);
17290 }
17291 else {
17292 return vm_call_iseq_setup_tailcall(ec, cfp, calling, opt_pc);
17293 }
17294}
17295static inline VALUE
17296vm_call_iseq_setup_normal(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const rb_callable_method_entry_t *me,
17297 int opt_pc, int param_size, int local_size)
17298{
17299 const rb_iseq_t *iseq = def_iseq_ptr(me->def);
17300 VALUE *argv = cfp->sp - calling->argc;
17301 VALUE *sp = argv + param_size;
17302 cfp->sp = argv - 1 ;
17303 vm_push_frame(ec, iseq, VM_FRAME_MAGIC_METHOD | VM_ENV_FLAG_LOCAL, calling->recv,
17304 calling->block_handler, (VALUE)me,
17305 ((iseq)->body)->iseq_encoded + opt_pc, sp,
17306 local_size - param_size,
17307 ((iseq)->body)->stack_max);
17308 return ((VALUE)RUBY_Qundef);
17309}
17310COLDFUNC static VALUE
17311vm_call_iseq_setup_tailcall(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, int opt_pc) {
17312 const struct rb_callcache *cc = calling->cc;
17313 unsigned int i;
17314 VALUE *argv = cfp->sp - calling->argc;
17315 const rb_callable_method_entry_t *me = vm_cc_cme(cc);
17316 const rb_iseq_t *iseq = def_iseq_ptr(me->def);
17317 VALUE *src_argv = argv;
17318 VALUE *sp_orig, *sp;
17319 VALUE finish_flag = VM_FRAME_FINISHED_P(cfp) ? VM_FRAME_FLAG_FINISH : 0;
17320 if (VM_BH_FROM_CFP_P(calling->block_handler, cfp)) {
17321 struct rb_captured_block *dst_captured = VM_CFP_TO_CAPTURED_BLOCK(((cfp)+1));
17322 const struct rb_captured_block *src_captured = VM_BH_TO_CAPT_BLOCK(calling->block_handler);
17323 dst_captured->code.val = src_captured->code.val;
17324 if (VM_BH_ISEQ_BLOCK_P(calling->block_handler)) {
17325 calling->block_handler = VM_BH_FROM_ISEQ_BLOCK(dst_captured);
17326 }
17327 else {
17328 calling->block_handler = VM_BH_FROM_IFUNC_BLOCK(dst_captured);
17329 }
17330 }
17331 vm_pop_frame(ec, cfp, cfp->ep);
17332 cfp = ec->cfp;
17333 sp_orig = sp = cfp->sp;
17334 sp[0] = calling->recv;
17335 sp++;
17336 for (i=0; i < ((iseq)->body)->param.size; i++) {
17337 *sp++ = src_argv[i];
17338 }
17339 vm_push_frame(ec, iseq, VM_FRAME_MAGIC_METHOD | VM_ENV_FLAG_LOCAL | finish_flag,
17340 calling->recv, calling->block_handler, (VALUE)me,
17341 ((iseq)->body)->iseq_encoded + opt_pc, sp,
17342 ((iseq)->body)->local_table_size - ((iseq)->body)->param.size,
17343 ((iseq)->body)->stack_max);
17344 cfp->sp = sp_orig;
17345 return ((VALUE)RUBY_Qundef);
17346}
17347static void
17348ractor_unsafe_check(void)
17349{
17350 if (!rb_ractor_main_p()) {
17351 rb_raise(rb_eRactorUnsafeError, "ractor unsafe method called from not main ractor");
17352 }
17353}
17354static VALUE
17355call_cfunc_m2(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17356{
17357 ractor_unsafe_check();
17358 return (*func)(recv, rb_ary_new_from_values(argc, argv));
17359}
17360static VALUE
17361call_cfunc_m1(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17362{
17363 ractor_unsafe_check();
17364 return (*func)(argc, argv, recv);
17365}
17366static VALUE
17367call_cfunc_0(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17368{
17369 ractor_unsafe_check();
17370 VALUE(*f)(VALUE) = (VALUE(*)(VALUE))func;
17371 return (*f)(recv);
17372}
17373static VALUE
17374call_cfunc_1(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17375{
17376 ractor_unsafe_check();
17377 VALUE(*f)(VALUE, VALUE) = (VALUE(*)(VALUE, VALUE))func;
17378 return (*f)(recv, argv[0]);
17379}
17380static VALUE
17381call_cfunc_2(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17382{
17383 ractor_unsafe_check();
17384 VALUE(*f)(VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE))func;
17385 return (*f)(recv, argv[0], argv[1]);
17386}
17387static VALUE
17388call_cfunc_3(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17389{
17390 ractor_unsafe_check();
17391 VALUE(*f)(VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE))func;
17392 return (*f)(recv, argv[0], argv[1], argv[2]);
17393}
17394static VALUE
17395call_cfunc_4(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17396{
17397 ractor_unsafe_check();
17398 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE))func;
17399 return (*f)(recv, argv[0], argv[1], argv[2], argv[3]);
17400}
17401static VALUE
17402call_cfunc_5(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17403{
17404 ractor_unsafe_check();
17405 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
17406 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4]);
17407}
17408static VALUE
17409call_cfunc_6(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17410{
17411 ractor_unsafe_check();
17412 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
17413 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]);
17414}
17415static VALUE
17416call_cfunc_7(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17417{
17418 ractor_unsafe_check();
17419 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
17420 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]);
17421}
17422static VALUE
17423call_cfunc_8(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17424{
17425 ractor_unsafe_check();
17426 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
17427 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]);
17428}
17429static VALUE
17430call_cfunc_9(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17431{
17432 ractor_unsafe_check();
17433 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
17434 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8]);
17435}
17436static VALUE
17437call_cfunc_10(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17438{
17439 ractor_unsafe_check();
17440 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
17441 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9]);
17442}
17443static VALUE
17444call_cfunc_11(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17445{
17446 ractor_unsafe_check();
17447 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
17448 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10]);
17449}
17450static VALUE
17451call_cfunc_12(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17452{
17453 ractor_unsafe_check();
17454 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
17455 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11]);
17456}
17457static VALUE
17458call_cfunc_13(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17459{
17460 ractor_unsafe_check();
17461 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
17462 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12]);
17463}
17464static VALUE
17465call_cfunc_14(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17466{
17467 ractor_unsafe_check();
17468 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
17469 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13]);
17470}
17471static VALUE
17472call_cfunc_15(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17473{
17474 ractor_unsafe_check();
17475 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
17476 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14]);
17477}
17478static VALUE
17479ractor_safe_call_cfunc_m2(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17480{
17481 return (*func)(recv, rb_ary_new_from_values(argc, argv));
17482}
17483static VALUE
17484ractor_safe_call_cfunc_m1(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17485{
17486 return (*func)(argc, argv, recv);
17487}
17488static VALUE
17489ractor_safe_call_cfunc_0(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17490{
17491 VALUE(*f)(VALUE) = (VALUE(*)(VALUE))func;
17492 return (*f)(recv);
17493}
17494static VALUE
17495ractor_safe_call_cfunc_1(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17496{
17497 VALUE(*f)(VALUE, VALUE) = (VALUE(*)(VALUE, VALUE))func;
17498 return (*f)(recv, argv[0]);
17499}
17500static VALUE
17501ractor_safe_call_cfunc_2(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17502{
17503 VALUE(*f)(VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE))func;
17504 return (*f)(recv, argv[0], argv[1]);
17505}
17506static VALUE
17507ractor_safe_call_cfunc_3(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17508{
17509 VALUE(*f)(VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE))func;
17510 return (*f)(recv, argv[0], argv[1], argv[2]);
17511}
17512static VALUE
17513ractor_safe_call_cfunc_4(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17514{
17515 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE))func;
17516 return (*f)(recv, argv[0], argv[1], argv[2], argv[3]);
17517}
17518static VALUE
17519ractor_safe_call_cfunc_5(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17520{
17521 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
17522 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4]);
17523}
17524static VALUE
17525ractor_safe_call_cfunc_6(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17526{
17527 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
17528 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]);
17529}
17530static VALUE
17531ractor_safe_call_cfunc_7(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17532{
17533 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
17534 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]);
17535}
17536static VALUE
17537ractor_safe_call_cfunc_8(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17538{
17539 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
17540 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]);
17541}
17542static VALUE
17543ractor_safe_call_cfunc_9(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17544{
17545 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
17546 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8]);
17547}
17548static VALUE
17549ractor_safe_call_cfunc_10(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17550{
17551 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
17552 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9]);
17553}
17554static VALUE
17555ractor_safe_call_cfunc_11(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17556{
17557 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
17558 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10]);
17559}
17560static VALUE
17561ractor_safe_call_cfunc_12(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17562{
17563 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
17564 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11]);
17565}
17566static VALUE
17567ractor_safe_call_cfunc_13(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17568{
17569 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
17570 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12]);
17571}
17572static VALUE
17573ractor_safe_call_cfunc_14(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17574{
17575 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
17576 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13]);
17577}
17578static VALUE
17579ractor_safe_call_cfunc_15(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
17580{
17581 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
17582 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14]);
17583}
17584static inline int
17585vm_cfp_consistent_p(rb_execution_context_t *ec, const rb_control_frame_t *reg_cfp)
17586{
17587 const int ov_flags = RAISED_STACKOVERFLOW;
17588 if ((__builtin_expect(!!(reg_cfp == ec->cfp + 1), 1))) return 1;
17589 if ((((ec)->raised_flag & (ov_flags)) != 0)) {
17590 ((ec)->raised_flag &= ~(ov_flags));
17591 return 1;
17592 }
17593 return 0;
17594}
17595static inline
17596const rb_method_cfunc_t *
17597vm_method_cfunc_entry(const rb_callable_method_entry_t *me)
17598{
17599 return __extension__({
17600 ;
17601 ; __typeof__(&(me->def)->body.cfunc) unaligned_member_access_result = (&(me->def)->body.cfunc);
17602 ; unaligned_member_access_result; });
17603}
17604static VALUE
17605vm_call_cfunc_with_frame(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling)
17606{
17607 ((void)0);
17608 const struct rb_callinfo *ci = calling->ci;
17609 const struct rb_callcache *cc = calling->cc;
17610 VALUE val;
17611 const rb_callable_method_entry_t *me = vm_cc_cme(cc);
17612 const rb_method_cfunc_t *cfunc = vm_method_cfunc_entry(me);
17613 int len = cfunc->argc;
17614 VALUE recv = calling->recv;
17615 VALUE block_handler = calling->block_handler;
17616 VALUE frame_type = VM_FRAME_MAGIC_CFUNC | VM_FRAME_FLAG_CFRAME | VM_ENV_FLAG_LOCAL;
17617 int argc = calling->argc;
17618 int orig_argc = argc;
17619 if ((__builtin_expect(!!(calling->kw_splat), 0))) {
17620 frame_type |= VM_FRAME_FLAG_CFRAME_KW;
17621 }
17622 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, me->owner, me->def->original_id, &args)) { do {} while (0); } } } while (0);
17623 do { const rb_event_flag_t flag_arg_ = (0x0020); rb_hook_list_t *hooks_arg_ = (rb_ec_ractor_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, recv, me->def->original_id, vm_ci_mid(ci), me->owner, ((VALUE)RUBY_Qundef), 0); } } while (0);
17624 vm_push_frame(ec, ((void *)0), frame_type, recv,
17625 block_handler, (VALUE)me,
17626 0, ec->cfp->sp, 0, 0);
17627 if (len >= 0) rb_check_arity(argc, len, len);
17628 reg_cfp->sp -= orig_argc + 1;
17629 val = (*cfunc->invoker)(recv, argc, reg_cfp->sp + 1, cfunc->func);
17630 ((__builtin_expect(!!(vm_cfp_consistent_p(ec, reg_cfp)), 1)) ? (void)0 : rb_bug("vm_call_cfunc" ": cfp consistency error (%p, %p)", (void *)reg_cfp, (void *)(ec->cfp+1)));
17631 rb_vm_pop_frame(ec);
17632 do { const rb_event_flag_t flag_arg_ = (0x0040); rb_hook_list_t *hooks_arg_ = (rb_ec_ractor_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, recv, me->def->original_id, vm_ci_mid(ci), me->owner, val, 0); } } while (0);
17633 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, me->owner, me->def->original_id, &args)) { do {} while (0); } } } while (0);
17634 return val;
17635}
17636static VALUE
17637vm_call_cfunc(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling)
17638{
17639 const struct rb_callinfo *ci = calling->ci;
17640 ((void)0);
17641 CALLER_SETUP_ARG(reg_cfp, calling, ci);
17642 CALLER_REMOVE_EMPTY_KW_SPLAT(reg_cfp, calling, ci);
17643 CC_SET_FASTPATH(calling->cc, vm_call_cfunc_with_frame, !rb_splat_or_kwargs_p(ci) && !calling->kw_splat);
17644 return vm_call_cfunc_with_frame(ec, reg_cfp, calling);
17645}
17646static VALUE
17647vm_call_ivar(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
17648{
17649 const struct rb_callcache *cc = calling->cc;
17650 ((void)0);
17651 cfp->sp -= 1;
17652 return vm_getivar(calling->recv, vm_cc_cme(cc)->def->body.attr.id, ((void *)0), ((void *)0), cc, 1);
17653}
17654static VALUE
17655vm_call_attrset(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
17656{
17657 const struct rb_callcache *cc = calling->cc;
17658 ((void)0);
17659 VALUE val = *(cfp->sp - 1);
17660 cfp->sp -= 2;
17661 return vm_setivar(calling->recv, vm_cc_cme(cc)->def->body.attr.id, val, ((void *)0), ((void *)0), cc, 1);
17662}static inline
17663_Bool
17664rb_vm_call_ivar_attrset_p(const vm_call_handler ch)
17665{
17666 return (ch == vm_call_ivar || ch == vm_call_attrset);
17667}
17668static inline VALUE
17669vm_call_bmethod_body(rb_execution_context_t *ec, struct rb_calling_info *calling, const VALUE *argv)
17670{
17671 rb_proc_t *proc;
17672 VALUE val;
17673 const struct rb_callcache *cc = calling->cc;
17674 const rb_callable_method_entry_t *cme = vm_cc_cme(cc);
17675 VALUE procv = cme->def->body.bmethod.proc;
17676 if (!RB_FL_TEST_RAW((procv), RUBY_FL_SHAREABLE) &&
17677 cme->def->body.bmethod.defined_ractor != rb_ractor_self(rb_ec_ractor_ptr(ec))) {
17678 rb_raise(rb_eRuntimeError, "defined with an un-shareable Proc in a different Ractor");
17679 }
17680 (((proc)) = (rb_proc_t*)((struct RData *)(((procv))))->data);
17681 val = rb_vm_invoke_bmethod(ec, proc, calling->recv, calling->argc, argv, calling->kw_splat, calling->block_handler, vm_cc_cme(cc));
17682 return val;
17683}
17684static VALUE
17685vm_call_bmethod(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
17686{
17687 ((void)0);
17688 VALUE *argv;
17689 int argc;
17690 const struct rb_callinfo *ci = calling->ci;
17691 CALLER_SETUP_ARG(cfp, calling, ci);
17692 argc = calling->argc;
17693 argv = ((VALUE *)__builtin_alloca (rbimpl_size_mul_or_raise(sizeof(VALUE), (argc))));
17694 ruby_nonempty_memcpy((argv), (cfp->sp - argc), rbimpl_size_mul_or_raise(sizeof(VALUE), (argc)));
17695 cfp->sp += - argc - 1;
17696 return vm_call_bmethod_body(ec, calling, argv);
17697}static inline
17698__attribute__ ((__visibility__("default"))) VALUE
17699rb_find_defined_class_by_owner(VALUE current_class, VALUE target_owner)
17700{
17701 VALUE klass = current_class;
17702 if (RB_TYPE_P(klass, RUBY_T_ICLASS) && RB_FL_TEST(klass, ((VALUE)RUBY_FL_USER0)) &&
17703 RB_TYPE_P(RBASIC_CLASS(klass), RUBY_T_CLASS)) {
17704 klass = RBASIC_CLASS(klass);
17705 }
17706 while (RB_TEST(klass)) {
17707 VALUE owner = RB_TYPE_P(klass, RUBY_T_ICLASS) ? RBASIC_CLASS(klass) : klass;
17708 if (owner == target_owner) {
17709 return klass;
17710 }
17711 klass = RCLASS_SUPER(klass);
17712 }
17713 return current_class;
17714}
17715static const rb_callable_method_entry_t *
17716aliased_callable_method_entry(const rb_callable_method_entry_t *me)
17717{
17718 const rb_method_entry_t *orig_me = me->def->body.alias.original_me;
17719 const rb_callable_method_entry_t *cme;
17720 if (orig_me->defined_class == 0) {
17721 VALUE defined_class = rb_find_defined_class_by_owner(me->defined_class, orig_me->owner);
17722 ((void)0);
17723 cme = rb_method_entry_complement_defined_class(orig_me, me->called_id, defined_class);
17724 if (me->def->alias_count + me->def->complemented_count == 0) {
17725 rb_obj_write((VALUE)(me), __extension__({
17726 ;
17727 ; __typeof__((VALUE *)(&me->def->body.alias.original_me)) unaligned_member_access_result = ((VALUE *)(&me->def->body.alias.original_me));
17728 ; unaligned_member_access_result; }), (VALUE)(cme), "./vm_insnhelper.c", 3159);
17729 }
17730 else {
17731 rb_method_definition_t *def =
17732 rb_method_definition_create(VM_METHOD_TYPE_ALIAS, me->def->original_id);
17733 rb_method_definition_set((rb_method_entry_t *)me, def, (void *)cme);
17734 }
17735 }
17736 else {
17737 cme = (const rb_callable_method_entry_t *)orig_me;
17738 }
17739 ((void)0);
17740 return cme;
17741}static inline
17742const rb_callable_method_entry_t *
17743rb_aliased_callable_method_entry(const rb_callable_method_entry_t *me)
17744{
17745 return aliased_callable_method_entry(me);
17746}
17747static VALUE
17748vm_call_alias(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
17749{
17750 calling->cc = &(struct rb_callcache) { .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5), .klass = ((VALUE)RUBY_Qundef), .cme_ = aliased_callable_method_entry(vm_cc_cme(calling->cc)), .call_ = vm_call_general, .aux_ = { 0 }, };
17751 return vm_call_method_each_type(ec, cfp, calling);
17752}
17753static enum method_missing_reason
17754ci_missing_reason(const struct rb_callinfo *ci)
17755{
17756 enum method_missing_reason stat = MISSING_NOENTRY;
17757 if (vm_ci_flag(ci) & (0x01 << VM_CALL_VCALL_bit)) stat |= MISSING_VCALL;
17758 if (vm_ci_flag(ci) & (0x01 << VM_CALL_FCALL_bit)) stat |= MISSING_FCALL;
17759 if (vm_ci_flag(ci) & (0x01 << VM_CALL_SUPER_bit)) stat |= MISSING_SUPER;
17760 return stat;
17761}
17762static VALUE
17763vm_call_symbol(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
17764 struct rb_calling_info *calling, const struct rb_callinfo *ci, VALUE symbol)
17765{
17766 ((__builtin_expect(!!(!!(calling->argc >= 0)), 1)) ? ((void)0) : __builtin_unreachable());
17767 enum method_missing_reason missing_reason = MISSING_NOENTRY;
17768 int argc = calling->argc;
17769 VALUE recv = calling->recv;
17770 VALUE klass = rb_class_of(recv);
17771 ID mid = rb_check_id(&symbol);
17772 int flags = (0x01 << VM_CALL_FCALL_bit) |
17773 (0x01 << VM_CALL_OPT_SEND_bit) |
17774 (calling->kw_splat ? (0x01 << VM_CALL_KW_SPLAT_bit) : 0);
17775 if ((__builtin_expect(!!(! mid), 0))) {
17776 mid = idMethodMissing;
17777 missing_reason = ci_missing_reason(ci);
17778 ec->method_missing_reason = missing_reason;
17779 int i = argc;
17780 do { __extension__ _Static_assert(sizeof(*((reg_cfp)->sp)) == sizeof(VALUE), "sizeof_sp" ": " "sizeof(*((reg_cfp)->sp)) == sizeof(VALUE)"); __extension__ _Static_assert(sizeof(*((reg_cfp))) == sizeof(rb_control_frame_t), "sizeof_cfp" ": " "sizeof(*((reg_cfp))) == sizeof(rb_control_frame_t)"); const struct rb_control_frame_struct *bound = (void *)&((reg_cfp)->sp)[((1))]; if ((__builtin_expect(!!(((reg_cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0);
17781 (((reg_cfp)->sp) += (((1))));
17782 memmove((&(*(((((reg_cfp)->sp)))-(i - 1)-1))), (&(*(((((reg_cfp)->sp)))-(i)-1))), rbimpl_size_mul_or_raise(sizeof(VALUE), (i)));
17783 argc = ++calling->argc;
17784 if (rb_method_basic_definition_p(klass, idMethodMissing)) {
17785 (*(((((reg_cfp)->sp)))-(i)-1)) = symbol;
17786 int priv = vm_ci_flag(ci) & ((0x01 << VM_CALL_FCALL_bit) | (0x01 << VM_CALL_VCALL_bit));
17787 const VALUE *argv = (((((reg_cfp)->sp)))-(argc));
17788 VALUE exc = rb_make_no_method_exception(
17789 rb_eNoMethodError, 0, recv, argc, argv, priv);
17790 rb_exc_raise(exc);
17791 }
17792 else {
17793 (*(((((reg_cfp)->sp)))-(i)-1)) = rb_str_intern(symbol);
17794 }
17795 }
17796 calling->ci = &(struct rb_callinfo) { .flags = RUBY_T_IMEMO | (imemo_callinfo << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .mid = mid, .flag = flags, .argc = argc, .kwarg = vm_ci_kwarg(ci), };
17797 calling->cc = &(struct rb_callcache) { .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5), .klass = klass, .cme_ = rb_callable_method_entry_with_refinements(klass, mid, ((void *)0)), .call_ = vm_call_general, .aux_ = { .method_missing_reason = missing_reason }, };
17798 return vm_call_method(ec, reg_cfp, calling);
17799}
17800static VALUE
17801vm_call_opt_send(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling)
17802{
17803 ((void)0);
17804 int i;
17805 VALUE sym;
17806 CALLER_SETUP_ARG(reg_cfp, calling, calling->ci);
17807 i = calling->argc - 1;
17808 if (calling->argc == 0) {
17809 rb_raise(rb_eArgError, "no method name given");
17810 }
17811 else {
17812 sym = (*(((((reg_cfp)->sp)))-(i)-1));
17813 if (i > 0) {
17814 memmove((&(*(((((reg_cfp)->sp)))-(i)-1))), (&(*(((((reg_cfp)->sp)))-(i-1)-1))), rbimpl_size_mul_or_raise(sizeof(VALUE), (i)));
17815 }
17816 calling->argc -= 1;
17817 (((reg_cfp)->sp) -= (((1))));
17818 return vm_call_symbol(ec, reg_cfp, calling, calling->ci, sym);
17819 }
17820}
17821static VALUE
17822vm_call_method_missing_body(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling,
17823 const struct rb_callinfo *orig_ci, enum method_missing_reason reason)
17824{
17825 ((void)0);
17826 VALUE *argv = (((((reg_cfp)->sp)))-(calling->argc));
17827 unsigned int argc;
17828 CALLER_SETUP_ARG(reg_cfp, calling, orig_ci);
17829 argc = calling->argc + 1;
17830 unsigned int flag = (0x01 << VM_CALL_FCALL_bit) | (0x01 << VM_CALL_OPT_SEND_bit) | (calling->kw_splat ? (0x01 << VM_CALL_KW_SPLAT_bit) : 0);
17831 calling->argc = argc;
17832 do { __extension__ _Static_assert(sizeof(*((reg_cfp)->sp)) == sizeof(VALUE), "sizeof_sp" ": " "sizeof(*((reg_cfp)->sp)) == sizeof(VALUE)"); __extension__ _Static_assert(sizeof(*((reg_cfp))) == sizeof(rb_control_frame_t), "sizeof_cfp" ": " "sizeof(*((reg_cfp))) == sizeof(rb_control_frame_t)"); const struct rb_control_frame_struct *bound = (void *)&((reg_cfp)->sp)[((1))]; if ((__builtin_expect(!!(((reg_cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0);
17833 ;
17834 if (argc > 1) {
17835 memmove((argv+1), (argv), rbimpl_size_mul_or_raise(sizeof(VALUE), (argc-1)));
17836 }
17837 argv[0] = rb_id2sym(vm_ci_mid(orig_ci));
17838 (((reg_cfp)->sp) += (((1))));
17839 ec->method_missing_reason = reason;
17840 calling->ci = &(struct rb_callinfo) { .flags = RUBY_T_IMEMO | (imemo_callinfo << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .mid = idMethodMissing, .flag = flag, .argc = argc, .kwarg = vm_ci_kwarg(orig_ci), };
17841 calling->cc = &(struct rb_callcache) { .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5), .klass = ((VALUE)RUBY_Qundef), .cme_ = rb_callable_method_entry_without_refinements(rb_class_of(calling->recv), idMethodMissing, ((void *)0)), .call_ = vm_call_general, .aux_ = { 0 }, };
17842 return vm_call_method(ec, reg_cfp, calling);
17843}
17844static VALUE
17845vm_call_method_missing(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling)
17846{
17847 return vm_call_method_missing_body(ec, reg_cfp, calling, calling->ci, vm_cc_cmethod_missing_reason(calling->cc));
17848}
17849static const rb_callable_method_entry_t *refined_method_callable_without_refinement(const rb_callable_method_entry_t *me);
17850static VALUE
17851vm_call_zsuper(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, VALUE klass)
17852{
17853 klass = RCLASS_SUPER(klass);
17854 const rb_callable_method_entry_t *cme = klass ? rb_callable_method_entry(klass, vm_ci_mid(calling->ci)) : ((void *)0);
17855 if (cme == ((void *)0)) {
17856 return vm_call_method_nome(ec, cfp, calling);
17857 }
17858 if (cme->def->type == VM_METHOD_TYPE_REFINED &&
17859 cme->def->body.refined.orig_me) {
17860 cme = refined_method_callable_without_refinement(cme);
17861 }
17862 calling->cc = &(struct rb_callcache) { .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5), .klass = ((VALUE)RUBY_Qundef), .cme_ = cme, .call_ = vm_call_general, .aux_ = { 0 }, };
17863 return vm_call_method_each_type(ec, cfp, calling);
17864}
17865static inline VALUE
17866find_refinement(VALUE refinements, VALUE klass)
17867{
17868 if (RB_NIL_P(refinements)) {
17869 return ((VALUE)RUBY_Qnil);
17870 }
17871 return rb_hash_lookup(refinements, klass);
17872}
17873__attribute__((__pure__)) static rb_control_frame_t * current_method_entry(const rb_execution_context_t *ec, rb_control_frame_t *cfp);
17874static rb_control_frame_t *
17875current_method_entry(const rb_execution_context_t *ec, rb_control_frame_t *cfp)
17876{
17877 rb_control_frame_t *top_cfp = cfp;
17878 if (cfp->iseq && ((cfp->iseq)->body)->type == ISEQ_TYPE_BLOCK) {
17879 const rb_iseq_t *local_iseq = ((cfp->iseq)->body)->local_iseq;
17880 do {
17881 cfp = ((cfp)+1);
17882 if (RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(ec, cfp)) {
17883 return top_cfp;
17884 }
17885 } while (cfp->iseq != local_iseq);
17886 }
17887 return cfp;
17888}
17889static const rb_callable_method_entry_t *
17890refined_method_callable_without_refinement(const rb_callable_method_entry_t *me)
17891{
17892 const rb_method_entry_t *orig_me = me->def->body.refined.orig_me;
17893 const rb_callable_method_entry_t *cme;
17894 if (orig_me->defined_class == 0) {
17895 cme = ((void *)0);
17896 rb_notimplement();
17897 }
17898 else {
17899 cme = (const rb_callable_method_entry_t *)orig_me;
17900 }
17901 ((void)0);
17902 if ((!(cme) || !(cme)->def || (cme)->def->type == VM_METHOD_TYPE_UNDEF)) {
17903 cme = ((void *)0);
17904 }
17905 return cme;
17906}
17907static const rb_callable_method_entry_t *
17908search_refined_method(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
17909{
17910 ID mid = vm_ci_mid(calling->ci);
17911 const rb_cref_t *cref = vm_get_cref(cfp->ep);
17912 const struct rb_callcache * const cc = calling->cc;
17913 const rb_callable_method_entry_t *cme = vm_cc_cme(cc);
17914 for (; cref; cref = CREF_NEXT(cref)) {
17915 const VALUE refinement = find_refinement(CREF_REFINEMENTS(cref), vm_cc_cme(cc)->owner);
17916 if (RB_NIL_P(refinement)) continue;
17917 const rb_callable_method_entry_t *const ref_me =
17918 rb_callable_method_entry(refinement, mid);
17919 if (ref_me) {
17920 if (vm_cc_call(cc) == vm_call_super_method) {
17921 const rb_control_frame_t *top_cfp = current_method_entry(ec, cfp);
17922 const rb_callable_method_entry_t *top_me = rb_vm_frame_method_entry(top_cfp);
17923 if (top_me && rb_method_definition_eq(ref_me->def, top_me->def)) {
17924 continue;
17925 }
17926 }
17927 if (cme->def->type != VM_METHOD_TYPE_REFINED ||
17928 cme->def != ref_me->def) {
17929 cme = ref_me;
17930 }
17931 if (ref_me->def->type != VM_METHOD_TYPE_REFINED) {
17932 return cme;
17933 }
17934 }
17935 else {
17936 return ((void *)0);
17937 }
17938 }
17939 if (vm_cc_cme(cc)->def->body.refined.orig_me) {
17940 return refined_method_callable_without_refinement(vm_cc_cme(cc));
17941 }
17942 else {
17943 VALUE klass = RCLASS_SUPER(vm_cc_cme(cc)->defined_class);
17944 const rb_callable_method_entry_t *cme = klass ? rb_callable_method_entry(klass, mid) : ((void *)0);
17945 return cme;
17946 }
17947}
17948static VALUE
17949vm_call_refined(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
17950{
17951 struct rb_callcache *ref_cc = &(struct rb_callcache) { .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5), .klass = ((VALUE)RUBY_Qundef), .cme_ = search_refined_method(ec, cfp, calling), .call_ = vm_call_general, .aux_ = { 0 }, };
17952 if (vm_cc_cme(ref_cc)) {
17953 calling->cc= ref_cc;
17954 return vm_call_method(ec, cfp, calling);
17955 }
17956 else {
17957 return vm_call_method_nome(ec, cfp, calling);
17958 }
17959}
17960static inline VALUE vm_invoke_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_callinfo *ci, _Bool is_lambda, VALUE block_handler);
17961__attribute__((__noinline__)) static VALUE vm_invoke_block_opt_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_callinfo *ci, VALUE block_handler);
17962static VALUE
17963vm_invoke_block_opt_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
17964 struct rb_calling_info *calling, const struct rb_callinfo *ci, VALUE block_handler)
17965{
17966 int argc = calling->argc;
17967 if (argc > 0) memmove((&(*(((((reg_cfp)->sp)))-(argc)-1))), (&(*(((((reg_cfp)->sp)))-(argc-1)-1))), rbimpl_size_mul_or_raise(sizeof(VALUE), (argc)));
17968 (((reg_cfp)->sp) -= (((1))));
17969 return vm_invoke_block(ec, reg_cfp, calling, ci, 0, block_handler);
17970}
17971static VALUE
17972vm_call_opt_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling)
17973{
17974 ((void)0);
17975 const struct rb_callinfo *ci = calling->ci;
17976 VALUE procval = calling->recv;
17977 return vm_invoke_block_opt_call(ec, reg_cfp, calling, ci, VM_BH_FROM_PROC(procval));
17978}
17979static VALUE
17980vm_call_opt_block_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling)
17981{
17982 ((void)0);
17983 VALUE block_handler = VM_ENV_BLOCK_HANDLER(VM_CF_LEP(reg_cfp));
17984 const struct rb_callinfo *ci = calling->ci;
17985 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_CALL)]&((1 << 12))) == 0), 1)))) {
17986 return vm_invoke_block_opt_call(ec, reg_cfp, calling, ci, block_handler);
17987 }
17988 else {
17989 calling->recv = rb_vm_bh_to_procval(ec, block_handler);
17990 calling->cc = rb_vm_search_method_slowpath(ci, rb_class_of(calling->recv));
17991 return vm_call_general(ec, reg_cfp, calling);
17992 }
17993}
17994static VALUE
17995vm_call_opt_struct_aref0(rb_execution_context_t *ec, struct rb_calling_info *calling)
17996{
17997 VALUE recv = calling->recv;
17998 ((void)0);
17999 ((void)0);
18000 ((void)0);
18001 const unsigned int off = vm_cc_cme(calling->cc)->def->body.optimized.index;
18002 return internal_RSTRUCT_GET(recv, off);
18003}
18004static VALUE
18005vm_call_opt_struct_aref(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling)
18006{
18007 ((void)0);
18008 VALUE ret = vm_call_opt_struct_aref0(ec, calling);
18009 reg_cfp->sp -= 1;
18010 return ret;
18011}
18012static VALUE
18013vm_call_opt_struct_aset0(rb_execution_context_t *ec, struct rb_calling_info *calling, VALUE val)
18014{
18015 VALUE recv = calling->recv;
18016 ((void)0);
18017 ((void)0);
18018 ((void)0);
18019 rb_check_frozen_inline(recv);
18020 const unsigned int off = vm_cc_cme(calling->cc)->def->body.optimized.index;
18021 internal_RSTRUCT_SET(recv, off, val);
18022 return val;
18023}
18024static VALUE
18025vm_call_opt_struct_aset(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling)
18026{
18027 ((void)0);
18028 VALUE ret = vm_call_opt_struct_aset0(ec, calling, *(reg_cfp->sp - 1));
18029 reg_cfp->sp -= 2;
18030 return ret;
18031}
18032__attribute__((__noinline__)) static VALUE vm_call_optimized(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_callinfo *ci, const struct rb_callcache *cc);
18033static VALUE
18034vm_call_optimized(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling,
18035 const struct rb_callinfo *ci, const struct rb_callcache *cc)
18036{
18037 switch (vm_cc_cme(cc)->def->body.optimized.type) {
18038 case OPTIMIZED_METHOD_TYPE_SEND:
18039 CC_SET_FASTPATH(cc, vm_call_opt_send, 1);
18040 return vm_call_opt_send(ec, cfp, calling);
18041 case OPTIMIZED_METHOD_TYPE_CALL:
18042 CC_SET_FASTPATH(cc, vm_call_opt_call, 1);
18043 return vm_call_opt_call(ec, cfp, calling);
18044 case OPTIMIZED_METHOD_TYPE_BLOCK_CALL:
18045 CC_SET_FASTPATH(cc, vm_call_opt_block_call, 1);
18046 return vm_call_opt_block_call(ec, cfp, calling);
18047 case OPTIMIZED_METHOD_TYPE_STRUCT_AREF:
18048 CALLER_SETUP_ARG(cfp, calling, ci);
18049 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
18050 rb_check_arity(calling->argc, 0, 0);
18051 CC_SET_FASTPATH(cc, vm_call_opt_struct_aref, (vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SIMPLE_bit)));
18052 return vm_call_opt_struct_aref(ec, cfp, calling);
18053 case OPTIMIZED_METHOD_TYPE_STRUCT_ASET:
18054 CALLER_SETUP_ARG(cfp, calling, ci);
18055 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
18056 rb_check_arity(calling->argc, 1, 1);
18057 CC_SET_FASTPATH(cc, vm_call_opt_struct_aset, (vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SIMPLE_bit)));
18058 return vm_call_opt_struct_aset(ec, cfp, calling);
18059 default:
18060 rb_bug("vm_call_method: unsupported optimized method type (%d)", vm_cc_cme(cc)->def->body.optimized.type);
18061 }
18062}
18063COLDFUNC static VALUE
18064vm_call_method_each_type(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling) {
18065 const struct rb_callinfo *ci = calling->ci;
18066 const struct rb_callcache *cc = calling->cc;
18067 const rb_callable_method_entry_t *cme = vm_cc_cme(cc);
18068 VALUE v;
18069 switch (cme->def->type) {
18070 case VM_METHOD_TYPE_ISEQ:
18071 CC_SET_FASTPATH(cc, vm_call_iseq_setup, 1);
18072 return vm_call_iseq_setup(ec, cfp, calling);
18073 case VM_METHOD_TYPE_NOTIMPLEMENTED:
18074 case VM_METHOD_TYPE_CFUNC:
18075 CC_SET_FASTPATH(cc, vm_call_cfunc, 1);
18076 return vm_call_cfunc(ec, cfp, calling);
18077 case VM_METHOD_TYPE_ATTRSET:
18078 CALLER_SETUP_ARG(cfp, calling, ci);
18079 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
18080 rb_check_arity(calling->argc, 1, 1);
18081 vm_cc_attr_index_initialize(cc);
18082 const unsigned int aset_mask = ((0x01 << VM_CALL_ARGS_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KWARG_bit));
18083 if ((__builtin_expect(!!(ruby_vm_event_flags & (0x0020 | 0x0040)), 0))) { do { const rb_event_flag_t flag_arg_ = (0x0020); rb_hook_list_t *hooks_arg_ = (rb_ec_ractor_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, calling->recv, vm_cc_cme(cc)->def->original_id, vm_ci_mid(ci), vm_cc_cme(cc)->owner, ((VALUE)RUBY_Qundef), 0); } } while (0); v = vm_call_attrset(ec, cfp, calling); do { const rb_event_flag_t flag_arg_ = (0x0040); rb_hook_list_t *hooks_arg_ = (rb_ec_ractor_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, calling->recv, vm_cc_cme(cc)->def->original_id, vm_ci_mid(ci), vm_cc_cme(cc)->owner, (v), 0); } } while (0); } else { CC_SET_FASTPATH(cc, vm_call_attrset, !(vm_ci_flag(ci) & aset_mask)); v = vm_call_attrset(ec, cfp, calling); };
18084 return v;
18085 case VM_METHOD_TYPE_IVAR:
18086 CALLER_SETUP_ARG(cfp, calling, ci);
18087 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
18088 rb_check_arity(calling->argc, 0, 0);
18089 vm_cc_attr_index_initialize(cc);
18090 const unsigned int ivar_mask = ((0x01 << VM_CALL_ARGS_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_bit));
18091 if ((__builtin_expect(!!(ruby_vm_event_flags & (0x0020 | 0x0040)), 0))) { do { const rb_event_flag_t flag_arg_ = (0x0020); rb_hook_list_t *hooks_arg_ = (rb_ec_ractor_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, calling->recv, vm_cc_cme(cc)->def->original_id, vm_ci_mid(ci), vm_cc_cme(cc)->owner, ((VALUE)RUBY_Qundef), 0); } } while (0); v = vm_call_ivar(ec, cfp, calling); do { const rb_event_flag_t flag_arg_ = (0x0040); rb_hook_list_t *hooks_arg_ = (rb_ec_ractor_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, calling->recv, vm_cc_cme(cc)->def->original_id, vm_ci_mid(ci), vm_cc_cme(cc)->owner, (v), 0); } } while (0); } else { CC_SET_FASTPATH(cc, vm_call_ivar, !(vm_ci_flag(ci) & ivar_mask)); v = vm_call_ivar(ec, cfp, calling); };
18092 return v;
18093 case VM_METHOD_TYPE_MISSING:
18094 vm_cc_method_missing_reason_set(cc, 0);
18095 CC_SET_FASTPATH(cc, vm_call_method_missing, 1);
18096 return vm_call_method_missing(ec, cfp, calling);
18097 case VM_METHOD_TYPE_BMETHOD:
18098 CC_SET_FASTPATH(cc, vm_call_bmethod, 1);
18099 return vm_call_bmethod(ec, cfp, calling);
18100 case VM_METHOD_TYPE_ALIAS:
18101 CC_SET_FASTPATH(cc, vm_call_alias, 1);
18102 return vm_call_alias(ec, cfp, calling);
18103 case VM_METHOD_TYPE_OPTIMIZED:
18104 return vm_call_optimized(ec, cfp, calling, ci, cc);
18105 case VM_METHOD_TYPE_UNDEF:
18106 break;
18107 case VM_METHOD_TYPE_ZSUPER:
18108 return vm_call_zsuper(ec, cfp, calling, (((rb_classext_t *)((char *)(vm_cc_cme(cc)->defined_class) + sizeof(struct RClass)))->origin_));
18109 case VM_METHOD_TYPE_REFINED:
18110 return vm_call_refined(ec, cfp, calling);
18111 }
18112 rb_bug("vm_call_method: unsupported method type (%d)", vm_cc_cme(cc)->def->type);
18113}
18114__attribute__((__noreturn__)) static void vm_raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE obj, int call_status);
18115static VALUE
18116vm_call_method_nome(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18117{
18118 const struct rb_callinfo *ci = calling->ci;
18119 const int stat = ci_missing_reason(ci);
18120 if (vm_ci_mid(ci) == idMethodMissing) {
18121 rb_control_frame_t *reg_cfp = cfp;
18122 VALUE *argv = (((((reg_cfp)->sp)))-(calling->argc));
18123 vm_raise_method_missing(ec, calling->argc, argv, calling->recv, stat);
18124 }
18125 else {
18126 return vm_call_method_missing_body(ec, cfp, calling, ci, stat);
18127 }
18128}
18129static inline VALUE
18130vm_call_method(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
18131{
18132 const struct rb_callinfo *ci = calling->ci;
18133 const struct rb_callcache *cc = calling->cc;
18134 ((void)0);
18135 if (vm_cc_cme(cc) != ((void *)0)) {
18136 switch ((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0))) {
18137 case METHOD_VISI_PUBLIC:
18138 return vm_call_method_each_type(ec, cfp, calling);
18139 case METHOD_VISI_PRIVATE:
18140 if (!(vm_ci_flag(ci) & (0x01 << VM_CALL_FCALL_bit))) {
18141 enum method_missing_reason stat = MISSING_PRIVATE;
18142 if (vm_ci_flag(ci) & (0x01 << VM_CALL_VCALL_bit)) stat |= MISSING_VCALL;
18143 vm_cc_method_missing_reason_set(cc, stat);
18144 CC_SET_FASTPATH(cc, vm_call_method_missing, 1);
18145 return vm_call_method_missing(ec, cfp, calling);
18146 }
18147 return vm_call_method_each_type(ec, cfp, calling);
18148 case METHOD_VISI_PROTECTED:
18149 if (!(vm_ci_flag(ci) & (0x01 << VM_CALL_OPT_SEND_bit))) {
18150 if (!rb_obj_is_kind_of(cfp->self, vm_cc_cme(cc)->defined_class)) {
18151 vm_cc_method_missing_reason_set(cc, MISSING_PROTECTED);
18152 return vm_call_method_missing(ec, cfp, calling);
18153 }
18154 else {
18155 ((void)0);
18156 struct rb_callcache cc_on_stack = *cc;
18157 RB_FL_SET_RAW((VALUE)&cc_on_stack, ((VALUE)RUBY_FL_USER4));
18158 calling->cc = &cc_on_stack;
18159 return vm_call_method_each_type(ec, cfp, calling);
18160 }
18161 }
18162 return vm_call_method_each_type(ec, cfp, calling);
18163 default:
18164 rb_bug("unreachable");
18165 }
18166 }
18167 else {
18168 return vm_call_method_nome(ec, cfp, calling);
18169 }
18170}
18171static VALUE
18172vm_call_general(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling)
18173{
18174 ((void)0);
18175 return vm_call_method(ec, reg_cfp, calling);
18176}static inline
18177void
18178rb_vm_cc_general(const struct rb_callcache *cc)
18179{
18180 ((void)0);
18181 ((void)0);
18182 *(vm_call_handler *)&cc->call_ = vm_call_general;
18183}
18184static VALUE
18185vm_call_super_method(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling)
18186{
18187 ((void)0);
18188 if (ec == ((void *)0)) rb_bug("unreachable");
18189 ((void)0);
18190 return vm_call_method(ec, reg_cfp, calling);
18191}
18192static inline VALUE
18193vm_search_normal_superclass(VALUE klass)
18194{
18195 if (RB_BUILTIN_TYPE(klass) == RUBY_T_ICLASS &&
18196 RB_TYPE_P(((struct RBasic *)(klass))->klass, RUBY_T_MODULE) &&
18197 RB_FL_TEST_RAW(((struct RBasic *)(klass))->klass, RMODULE_IS_REFINEMENT)) {
18198 klass = ((struct RBasic *)(klass))->klass;
18199 }
18200 klass = (((rb_classext_t *)((char *)(klass) + sizeof(struct RClass)))->origin_);
18201 return RCLASS_SUPER(klass);
18202}
18203__attribute__((__noreturn__)) static void vm_super_outside(void);
18204static void
18205vm_super_outside(void)
18206{
18207 rb_raise(rb_eNoMethodError, "super called outside of method");
18208}
18209static const struct rb_callcache *
18210empty_cc_for_super(void)
18211{
18212 return rb_vm_empty_cc_for_super();
18213}
18214static const struct rb_callcache *
18215vm_search_super_method(const rb_control_frame_t *reg_cfp, struct rb_call_data *cd, VALUE recv)
18216{
18217 VALUE current_defined_class;
18218 const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(reg_cfp);
18219 if (!me) {
18220 vm_super_outside();
18221 }
18222 current_defined_class = me->defined_class;
18223 if (!RB_NIL_P((((rb_classext_t *)((char *)(current_defined_class) + sizeof(struct RClass)))->refined_class))) {
18224 current_defined_class = (((rb_classext_t *)((char *)(current_defined_class) + sizeof(struct RClass)))->refined_class);
18225 }
18226 if (RB_BUILTIN_TYPE(current_defined_class) != RUBY_T_MODULE &&
18227 reg_cfp->iseq != method_entry_iseqptr(me) &&
18228 !rb_obj_is_kind_of(recv, current_defined_class)) {
18229 VALUE m = RB_TYPE_P(current_defined_class, RUBY_T_ICLASS) ?
18230 (((rb_classext_t *)((char *)(current_defined_class) + sizeof(struct RClass)))->includer) : current_defined_class;
18231 if (m) {
18232 rb_raise(rb_eTypeError,
18233 "self has wrong type to call super in this context: "
18234 "%""l""i" "\v"" (expected %""l""i" "\v"")",
18235 rb_obj_class(recv), m);
18236 }
18237 }
18238 if (me->def->type == VM_METHOD_TYPE_BMETHOD && (vm_ci_flag(cd->ci) & (0x01 << VM_CALL_ZSUPER_bit))) {
18239 rb_raise(rb_eRuntimeError,
18240 "implicit argument passing of super from method defined"
18241 " by define_method() is not supported."
18242 " Specify all arguments explicitly.");
18243 }
18244 ID mid = me->def->original_id;
18245 cd->ci = vm_ci_new_runtime_(mid, vm_ci_flag(cd->ci), vm_ci_argc(cd->ci), vm_ci_kwarg(cd->ci), "./vm_insnhelper.c", 3867);
18246 (rb_obj_written((VALUE)(reg_cfp->iseq), (VALUE)(((VALUE)RUBY_Qundef)), (VALUE)(cd->ci), "./vm_insnhelper.c", 3872));
18247 const struct rb_callcache *cc;
18248 VALUE klass = vm_search_normal_superclass(me->defined_class);
18249 if (!klass) {
18250 cc = vm_cc_new(klass, ((void *)0), vm_call_method_missing);
18251 rb_obj_write((VALUE)(reg_cfp->iseq), __extension__({
18252 ;
18253 ; __typeof__((VALUE *)(&cd->cc)) unaligned_member_access_result = ((VALUE *)(&cd->cc));
18254 ; unaligned_member_access_result; }), (VALUE)(cc), "./vm_insnhelper.c", 3881);
18255 }
18256 else {
18257 cc = vm_search_method_fastpath((VALUE)reg_cfp->iseq, cd, klass);
18258 const rb_callable_method_entry_t *cached_cme = vm_cc_cme(cc);
18259 if (cached_cme == ((void *)0)) {
18260 cd->cc = empty_cc_for_super();
18261 }
18262 else if (cached_cme->called_id != mid) {
18263 const rb_callable_method_entry_t *cme = rb_callable_method_entry(klass, mid);
18264 if (cme) {
18265 cc = vm_cc_new(klass, cme, vm_call_super_method);
18266 rb_obj_write((VALUE)(reg_cfp->iseq), __extension__({
18267 ;
18268 ; __typeof__((VALUE *)(&cd->cc)) unaligned_member_access_result = ((VALUE *)(&cd->cc));
18269 ; unaligned_member_access_result; }), (VALUE)(cc), "./vm_insnhelper.c", 3896);
18270 }
18271 else {
18272 cd->cc = cc = empty_cc_for_super();
18273 }
18274 }
18275 else {
18276 switch (cached_cme->def->type) {
18277 case VM_METHOD_TYPE_REFINED:
18278 case VM_METHOD_TYPE_ATTRSET:
18279 case VM_METHOD_TYPE_IVAR:
18280 vm_cc_call_set(cc, vm_call_super_method);
18281 break;
18282 default:
18283 break;
18284 }
18285 }
18286 }
18287 ((void)0);
18288 return cc;
18289}
18290static inline int
18291block_proc_is_lambda(const VALUE procval)
18292{
18293 rb_proc_t *proc;
18294 if (procval) {
18295 (((proc)) = (rb_proc_t*)((struct RData *)(((procval))))->data);
18296 return proc->is_lambda;
18297 }
18298 else {
18299 return 0;
18300 }
18301}
18302static VALUE
18303vm_yield_with_cfunc(rb_execution_context_t *ec,
18304 const struct rb_captured_block *captured,
18305 VALUE self, int argc, const VALUE *argv, int kw_splat, VALUE block_handler,
18306 const rb_callable_method_entry_t *me)
18307{
18308 int is_lambda = 0;
18309 VALUE val, arg, blockarg;
18310 int frame_flag;
18311 const struct vm_ifunc *ifunc = captured->code.ifunc;
18312 if (is_lambda) {
18313 arg = rb_ary_new_from_values(argc, argv);
18314 }
18315 else if (argc == 0) {
18316 arg = ((VALUE)RUBY_Qnil);
18317 }
18318 else {
18319 arg = argv[0];
18320 }
18321 blockarg = rb_vm_bh_to_procval(ec, block_handler);
18322 frame_flag = VM_FRAME_MAGIC_IFUNC | VM_FRAME_FLAG_CFRAME | (me ? VM_FRAME_FLAG_BMETHOD : 0);
18323 if (kw_splat) {
18324 frame_flag |= VM_FRAME_FLAG_CFRAME_KW;
18325 }
18326 vm_push_frame(ec, (const rb_iseq_t *)captured->code.ifunc,
18327 frame_flag,
18328 self,
18329 ((VALUE)((captured->ep)) | (0x01)),
18330 (VALUE)me,
18331 0, ec->cfp->sp, 0, 0);
18332 val = (*ifunc->func)(arg, (VALUE)ifunc->data, argc, argv, blockarg);
18333 rb_vm_pop_frame(ec);
18334 return val;
18335}
18336static VALUE
18337vm_yield_with_symbol(rb_execution_context_t *ec, VALUE symbol, int argc, const VALUE *argv, int kw_splat, VALUE block_handler)
18338{
18339 return rb_sym_proc_call(rb_sym2id(symbol), argc, argv, kw_splat, rb_vm_bh_to_procval(ec, block_handler));
18340}
18341static inline int
18342vm_callee_setup_block_arg_arg0_splat(rb_control_frame_t *cfp, const rb_iseq_t *iseq, VALUE *argv, VALUE ary)
18343{
18344 int i;
18345 long len = rb_array_len(ary);
18346 do { __extension__ _Static_assert(sizeof(*((cfp)->sp)) == sizeof(VALUE), "sizeof_sp" ": " "sizeof(*((cfp)->sp)) == sizeof(VALUE)"); __extension__ _Static_assert(sizeof(*((cfp))) == sizeof(rb_control_frame_t), "sizeof_cfp" ": " "sizeof(*((cfp))) == sizeof(rb_control_frame_t)"); const struct rb_control_frame_struct *bound = (void *)&((cfp)->sp)[((((iseq)->body)->param.lead_num))]; if ((__builtin_expect(!!(((cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0);
18347 for (i=0; i<len && i<((iseq)->body)->param.lead_num; i++) {
18348 argv[i] = RARRAY_AREF(ary, i);
18349 }
18350 return i;
18351}
18352static inline VALUE
18353vm_callee_setup_block_arg_arg0_check(VALUE *argv)
18354{
18355 VALUE ary, arg0 = argv[0];
18356 ary = rb_check_array_type(arg0);
18357 ((void)0);
18358 return ary;
18359}
18360static int
18361vm_callee_setup_block_arg(rb_execution_context_t *ec, struct rb_calling_info *calling, const struct rb_callinfo *ci, const rb_iseq_t *iseq, VALUE *argv, const enum arg_setup_type arg_setup_type)
18362{
18363 if (rb_simple_iseq_p(iseq)) {
18364 rb_control_frame_t *cfp = ec->cfp;
18365 VALUE arg0;
18366 CALLER_SETUP_ARG(cfp, calling, ci);
18367 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
18368 if (arg_setup_type == arg_setup_block &&
18369 calling->argc == 1 &&
18370 ((iseq)->body)->param.flags.has_lead &&
18371 !((iseq)->body)->param.flags.ambiguous_param0 &&
18372 !RB_NIL_P(arg0 = vm_callee_setup_block_arg_arg0_check(argv))) {
18373 calling->argc = vm_callee_setup_block_arg_arg0_splat(cfp, iseq, argv, arg0);
18374 }
18375 if (calling->argc != ((iseq)->body)->param.lead_num) {
18376 if (arg_setup_type == arg_setup_block) {
18377 if (calling->argc < ((iseq)->body)->param.lead_num) {
18378 int i;
18379 do { __extension__ _Static_assert(sizeof(*((cfp)->sp)) == sizeof(VALUE), "sizeof_sp" ": " "sizeof(*((cfp)->sp)) == sizeof(VALUE)"); __extension__ _Static_assert(sizeof(*((cfp))) == sizeof(rb_control_frame_t), "sizeof_cfp" ": " "sizeof(*((cfp))) == sizeof(rb_control_frame_t)"); const struct rb_control_frame_struct *bound = (void *)&((cfp)->sp)[((((iseq)->body)->param.lead_num))]; if ((__builtin_expect(!!(((cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0);
18380 for (i=calling->argc; i<((iseq)->body)->param.lead_num; i++) argv[i] = ((VALUE)RUBY_Qnil);
18381 calling->argc = ((iseq)->body)->param.lead_num;
18382 }
18383 else if (calling->argc > ((iseq)->body)->param.lead_num) {
18384 calling->argc = ((iseq)->body)->param.lead_num;
18385 }
18386 }
18387 else {
18388 argument_arity_error(ec, iseq, calling->argc, ((iseq)->body)->param.lead_num, ((iseq)->body)->param.lead_num);
18389 }
18390 }
18391 return 0;
18392 }
18393 else {
18394 return setup_parameters_complex(ec, iseq, calling, ci, argv, arg_setup_type);
18395 }
18396}
18397static int
18398vm_yield_setup_args(rb_execution_context_t *ec, const rb_iseq_t *iseq, const int argc, VALUE *argv, int kw_splat, VALUE block_handler, enum arg_setup_type arg_setup_type)
18399{
18400 struct rb_calling_info calling_entry, *calling;
18401 calling = &calling_entry;
18402 calling->argc = argc;
18403 calling->block_handler = block_handler;
18404 calling->kw_splat = kw_splat;
18405 calling->recv = ((VALUE)RUBY_Qundef);
18406 struct rb_callinfo dummy_ci = (struct rb_callinfo) { .flags = RUBY_T_IMEMO | (imemo_callinfo << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .mid = 0, .flag = (kw_splat ? (0x01 << VM_CALL_KW_SPLAT_bit) : 0), .argc = 0, .kwarg = 0, };
18407 return vm_callee_setup_block_arg(ec, calling, &dummy_ci, iseq, argv, arg_setup_type);
18408}
18409static VALUE
18410vm_invoke_iseq_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
18411 struct rb_calling_info *calling, const struct rb_callinfo *ci,
18412 _Bool is_lambda, VALUE block_handler)
18413{
18414 const struct rb_captured_block *captured = VM_BH_TO_ISEQ_BLOCK(block_handler);
18415 const rb_iseq_t *iseq = rb_iseq_check(captured->code.iseq);
18416 const int arg_size = ((iseq)->body)->param.size;
18417 VALUE * const rsp = ((((reg_cfp)->sp))) - calling->argc;
18418 int opt_pc = vm_callee_setup_block_arg(ec, calling, ci, iseq, rsp, is_lambda ? arg_setup_method : arg_setup_block);
18419 (((reg_cfp)->sp) = (((rsp))));
18420 vm_push_frame(ec, iseq,
18421 VM_FRAME_MAGIC_BLOCK | (is_lambda ? VM_FRAME_FLAG_LAMBDA : 0),
18422 captured->self,
18423 ((VALUE)((captured->ep)) | (0x01)), 0,
18424 ((iseq)->body)->iseq_encoded + opt_pc,
18425 rsp + arg_size,
18426 ((iseq)->body)->local_table_size - arg_size, ((iseq)->body)->stack_max);
18427 return ((VALUE)RUBY_Qundef);
18428}
18429static VALUE
18430vm_invoke_symbol_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
18431 struct rb_calling_info *calling, const struct rb_callinfo *ci,
18432 __attribute__ ((__unused__)) _Bool is_lambda, VALUE block_handler)
18433{
18434 if (calling->argc < 1) {
18435 rb_raise(rb_eArgError, "no receiver given");
18436 }
18437 else {
18438 VALUE symbol = VM_BH_TO_SYMBOL(block_handler);
18439 CALLER_SETUP_ARG(reg_cfp, calling, ci);
18440 calling->recv = (*(((((reg_cfp)->sp)))-(--calling->argc)-1));
18441 return vm_call_symbol(ec, reg_cfp, calling, ci, symbol);
18442 }
18443}
18444static VALUE
18445vm_invoke_ifunc_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
18446 struct rb_calling_info *calling, const struct rb_callinfo *ci,
18447 __attribute__ ((__unused__)) _Bool is_lambda, VALUE block_handler)
18448{
18449 VALUE val;
18450 int argc;
18451 const struct rb_captured_block *captured = VM_BH_TO_IFUNC_BLOCK(block_handler);
18452 CALLER_SETUP_ARG(ec->cfp, calling, ci);
18453 CALLER_REMOVE_EMPTY_KW_SPLAT(ec->cfp, calling, ci);
18454 argc = calling->argc;
18455 val = vm_yield_with_cfunc(ec, captured, captured->self, argc, (((((reg_cfp)->sp)))-(argc)), calling->kw_splat, calling->block_handler, ((void *)0));
18456 ((((reg_cfp)->sp) -= (((argc)))));
18457 return val;
18458}
18459static VALUE
18460vm_proc_to_block_handler(VALUE procval)
18461{
18462 const struct rb_block *block = vm_proc_block(procval);
18463 switch (vm_block_type(block)) {
18464 case block_type_iseq:
18465 return VM_BH_FROM_ISEQ_BLOCK(&block->as.captured);
18466 case block_type_ifunc:
18467 return VM_BH_FROM_IFUNC_BLOCK(&block->as.captured);
18468 case block_type_symbol:
18469 return VM_BH_FROM_SYMBOL(block->as.symbol);
18470 case block_type_proc:
18471 return VM_BH_FROM_PROC(block->as.proc);
18472 }
18473 __builtin_unreachable();
18474 return ((VALUE)RUBY_Qundef);
18475}
18476static VALUE
18477vm_invoke_proc_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
18478 struct rb_calling_info *calling, const struct rb_callinfo *ci,
18479 _Bool is_lambda, VALUE block_handler)
18480{
18481 while (vm_block_handler_type(block_handler) == block_handler_type_proc) {
18482 VALUE proc = VM_BH_TO_PROC(block_handler);
18483 is_lambda = block_proc_is_lambda(proc);
18484 block_handler = vm_proc_to_block_handler(proc);
18485 }
18486 return vm_invoke_block(ec, reg_cfp, calling, ci, is_lambda, block_handler);
18487}
18488static inline VALUE
18489vm_invoke_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
18490 struct rb_calling_info *calling, const struct rb_callinfo *ci,
18491 _Bool is_lambda, VALUE block_handler)
18492{
18493 VALUE (*func)(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
18494 struct rb_calling_info *calling, const struct rb_callinfo *ci,
18495 _Bool is_lambda, VALUE block_handler);
18496 switch (vm_block_handler_type(block_handler)) {
18497 case block_handler_type_iseq: func = vm_invoke_iseq_block; break;
18498 case block_handler_type_ifunc: func = vm_invoke_ifunc_block; break;
18499 case block_handler_type_proc: func = vm_invoke_proc_block; break;
18500 case block_handler_type_symbol: func = vm_invoke_symbol_block; break;
18501 default: rb_bug("vm_invoke_block: unreachable");
18502 }
18503 return func(ec, reg_cfp, calling, ci, is_lambda, block_handler);
18504}
18505static VALUE
18506vm_make_proc_with_iseq(const rb_iseq_t *blockiseq)
18507{
18508 const rb_execution_context_t *ec = rb_current_execution_context(1);
18509 const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp);
18510 struct rb_captured_block *captured;
18511 if (cfp == 0) {
18512 rb_bug("vm_make_proc_with_iseq: unreachable");
18513 }
18514 captured = VM_CFP_TO_CAPTURED_BLOCK(cfp);
18515 captured->code.iseq = blockiseq;
18516 return rb_vm_make_proc(ec, captured, rb_cProc);
18517}
18518static VALUE
18519vm_once_exec(VALUE iseq)
18520{
18521 VALUE proc = vm_make_proc_with_iseq((rb_iseq_t *)iseq);
18522 return rb_proc_call_with_block(proc, 0, 0, ((VALUE)RUBY_Qnil));
18523}
18524static VALUE
18525vm_once_clear(VALUE data)
18526{
18527 union iseq_inline_storage_entry *is = (union iseq_inline_storage_entry *)data;
18528 is->once.running_thread = ((void *)0);
18529 return ((VALUE)RUBY_Qnil);
18530}
18531static _Bool
18532check_respond_to_missing(VALUE obj, VALUE v)
18533{
18534 VALUE args[2];
18535 VALUE r;
18536 args[0] = obj; args[1] = ((VALUE)RUBY_Qfalse);
18537 r = rb_check_funcall(v, idRespond_to_missing, 2, args);
18538 if (r != ((VALUE)RUBY_Qundef) && RB_TEST(r)) {
18539 return 1;
18540 }
18541 else {
18542 return 0;
18543 }
18544}
18545static _Bool
18546vm_defined(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, rb_num_t op_type, VALUE obj, VALUE v)
18547{
18548 VALUE klass;
18549 enum defined_type type = (enum defined_type)op_type;
18550 switch (type) {
18551 case DEFINED_IVAR:
18552 return rb_ivar_defined((((((reg_cfp)))->self)), rb_sym2id(obj));
18553 break;
18554 case DEFINED_GVAR:
18555 return rb_gvar_defined(rb_sym2id(obj));
18556 break;
18557 case DEFINED_CVAR: {
18558 const rb_cref_t *cref = vm_get_cref(((((reg_cfp)->ep))));
18559 klass = vm_get_cvar_base(cref, (((reg_cfp))), 0);
18560 return rb_cvar_defined(klass, rb_sym2id(obj));
18561 break;
18562 }
18563 case DEFINED_CONST:
18564 case DEFINED_CONST_FROM: {
18565 _Bool allow_nil = type == DEFINED_CONST;
18566 klass = v;
18567 return vm_get_ev_const(ec, klass, rb_sym2id(obj), allow_nil, 1);
18568 break;
18569 }
18570 case DEFINED_FUNC:
18571 klass = rb_class_of(v);
18572 return rb_ec_obj_respond_to(ec, v, rb_sym2id(obj), 1);
18573 break;
18574 case DEFINED_METHOD:{
18575 VALUE klass = rb_class_of(v);
18576 const rb_method_entry_t *me = rb_method_entry_with_refinements(klass, rb_sym2id(obj), ((void *)0));
18577 if (me) {
18578 switch ((rb_method_visibility_t)(((me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0))) {
18579 case METHOD_VISI_PRIVATE:
18580 break;
18581 case METHOD_VISI_PROTECTED:
18582 if (!rb_obj_is_kind_of((((((reg_cfp)))->self)), rb_class_real(me->defined_class))) {
18583 break;
18584 }
18585 case METHOD_VISI_PUBLIC:
18586 return 1;
18587 break;
18588 default:
18589 rb_bug("vm_defined: unreachable: %u", (unsigned int)(rb_method_visibility_t)(((me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)));
18590 }
18591 }
18592 else {
18593 return check_respond_to_missing(obj, v);
18594 }
18595 break;
18596 }
18597 case DEFINED_YIELD:
18598 if (((VM_EP_LEP(((((reg_cfp)->ep)))))[(-1)]) != 0) {
18599 return 1;
18600 }
18601 break;
18602 case DEFINED_ZSUPER:
18603 {
18604 const rb_callable_method_entry_t *me = rb_vm_frame_method_entry((((reg_cfp))));
18605 if (me) {
18606 VALUE klass = vm_search_normal_superclass(me->defined_class);
18607 ID id = me->def->original_id;
18608 return rb_method_boundp(klass, id, 0);
18609 }
18610 }
18611 break;
18612 case DEFINED_REF:{
18613 return vm_getspecial(ec, (VM_EP_LEP(((((reg_cfp)->ep))))), ((VALUE)RUBY_Qfalse), RB_FIX2INT(obj)) != ((VALUE)RUBY_Qnil);
18614 break;
18615 }
18616 default:
18617 rb_bug("unimplemented defined? type (VM)");
18618 break;
18619 }
18620 return 0;
18621}static inline
18622_Bool
18623rb_vm_defined(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, rb_num_t op_type, VALUE obj, VALUE v)
18624{
18625 return vm_defined(ec, reg_cfp, op_type, obj, v);
18626}
18627static const VALUE *
18628vm_get_ep(const VALUE *const reg_ep, rb_num_t lv)
18629{
18630 rb_num_t i;
18631 const VALUE *ep = reg_ep;
18632 for (i = 0; i < lv; i++) {
18633 ep = ((VALUE *)((ep)[(-1)] & ~0x03));
18634 }
18635 return ep;
18636}
18637static VALUE
18638vm_get_special_object(const VALUE *const reg_ep,
18639 enum vm_special_object_type type)
18640{
18641 switch (type) {
18642 case VM_SPECIAL_OBJECT_VMCORE:
18643 return rb_mRubyVMFrozenCore;
18644 case VM_SPECIAL_OBJECT_CBASE:
18645 return vm_get_cbase(reg_ep);
18646 case VM_SPECIAL_OBJECT_CONST_BASE:
18647 return vm_get_const_base(reg_ep);
18648 default:
18649 rb_bug("putspecialobject insn: unknown value_type %d", type);
18650 }
18651}
18652static VALUE
18653vm_concat_array(VALUE ary1, VALUE ary2st)
18654{
18655 const VALUE ary2 = ary2st;
18656 VALUE tmp1 = rb_check_to_array(ary1);
18657 VALUE tmp2 = rb_check_to_array(ary2);
18658 if (RB_NIL_P(tmp1)) {
18659 tmp1 = __extension__ ({ const VALUE args_to_new_ary[] = {ary1}; if (__builtin_constant_p(1)) { __extension__ _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (1), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (1)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); });
18660 }
18661 if (RB_NIL_P(tmp2)) {
18662 tmp2 = __extension__ ({ const VALUE args_to_new_ary[] = {ary2}; if (__builtin_constant_p(1)) { __extension__ _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (1), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (1)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); });
18663 }
18664 if (tmp1 == ary1) {
18665 tmp1 = rb_ary_dup(ary1);
18666 }
18667 return rb_ary_concat(tmp1, tmp2);
18668}
18669static VALUE
18670vm_splat_array(VALUE flag, VALUE ary)
18671{
18672 VALUE tmp = rb_check_to_array(ary);
18673 if (RB_NIL_P(tmp)) {
18674 return __extension__ ({ const VALUE args_to_new_ary[] = {ary}; if (__builtin_constant_p(1)) { __extension__ _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (1), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (1)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); });
18675 }
18676 else if (RB_TEST(flag)) {
18677 return rb_ary_dup(tmp);
18678 }
18679 else {
18680 return tmp;
18681 }
18682}static inline
18683VALUE
18684rb_vm_splat_array(VALUE flag, VALUE ary)
18685{
18686 return vm_splat_array(flag, ary);
18687}
18688static VALUE
18689vm_check_match(rb_execution_context_t *ec, VALUE target, VALUE pattern, rb_num_t flag)
18690{
18691 enum vm_check_match_type type = ((int)flag) & 0x03;
18692 if (flag & 0x04) {
18693 long i;
18694 const long n = rb_array_len(pattern);
18695 for (i = 0; i < n; i++) {
18696 VALUE v = RARRAY_AREF(pattern, i);
18697 VALUE c = check_match(ec, v, target, type);
18698 if (RB_TEST(c)) {
18699 return c;
18700 }
18701 }
18702 return ((VALUE)RUBY_Qfalse);
18703 }
18704 else {
18705 return check_match(ec, pattern, target, type);
18706 }
18707}
18708static VALUE
18709vm_check_keyword(lindex_t bits, lindex_t idx, const VALUE *ep)
18710{
18711 const VALUE kw_bits = *(ep - bits);
18712 if (RB_FIXNUM_P(kw_bits)) {
18713 unsigned int b = (unsigned int)rb_fix2ulong(kw_bits);
18714 if ((idx < (32-1)) && (b & (0x01 << idx)))
18715 return ((VALUE)RUBY_Qfalse);
18716 }
18717 else {
18718 ((void)0);
18719 if (rb_hash_has_key(kw_bits, __builtin_choose_expr( __builtin_constant_p(idx), ((VALUE)(idx)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(idx)))) return ((VALUE)RUBY_Qfalse);
18720 }
18721 return ((VALUE)RUBY_Qtrue);
18722}
18723static void
18724vm_dtrace(rb_event_flag_t flag, rb_execution_context_t *ec)
18725{
18726 if (0 ||
18727 0 ||
18728 0 ||
18729 0) {
18730 switch (flag) {
18731 case 0x0008:
18732 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
18733 return;
18734 case 0x0020:
18735 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
18736 return;
18737 case 0x0010:
18738 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
18739 return;
18740 case 0x0040:
18741 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
18742 return;
18743 }
18744 }
18745}
18746static VALUE
18747vm_const_get_under(ID id, rb_num_t flags, VALUE cbase)
18748{
18749 VALUE ns;
18750 if ((ns = vm_search_const_defined_class(cbase, id)) == 0) {
18751 return ns;
18752 }
18753 else if (((flags) & 0x08)) {
18754 return rb_public_const_get_at(ns, id);
18755 }
18756 else {
18757 return rb_const_get_at(ns, id);
18758 }
18759}
18760static VALUE
18761vm_check_if_class(ID id, rb_num_t flags, VALUE super, VALUE klass)
18762{
18763 if (!RB_TYPE_P(klass, RUBY_T_CLASS)) {
18764 return 0;
18765 }
18766 else if (((flags) & 0x10)) {
18767 VALUE tmp = rb_class_real(RCLASS_SUPER(klass));
18768 if (tmp != super) {
18769 rb_raise(rb_eTypeError,
18770 "superclass mismatch for class %""l""i" "\v""",
18771 rb_id2str(id));
18772 }
18773 else {
18774 return klass;
18775 }
18776 }
18777 else {
18778 return klass;
18779 }
18780}
18781static VALUE
18782vm_check_if_module(ID id, VALUE mod)
18783{
18784 if (!RB_TYPE_P(mod, RUBY_T_MODULE)) {
18785 return 0;
18786 }
18787 else {
18788 return mod;
18789 }
18790}
18791static VALUE
18792declare_under(ID id, VALUE cbase, VALUE c)
18793{
18794 rb_set_class_path_string(c, cbase, rb_id2str(id));
18795 rb_const_set(cbase, id, c);
18796 return c;
18797}
18798static VALUE
18799vm_declare_class(ID id, rb_num_t flags, VALUE cbase, VALUE super)
18800{
18801 VALUE s = ((flags) & 0x10) ? super : rb_cObject;
18802 VALUE c = declare_under(id, cbase, rb_define_class_id(id, s));
18803 rb_define_alloc_func(c, rb_get_alloc_func(c));
18804 rb_class_inherited(s, c);
18805 return c;
18806}
18807static VALUE
18808vm_declare_module(ID id, VALUE cbase)
18809{
18810 return declare_under(id, cbase, rb_module_new());
18811}
18812__attribute__((__noreturn__)) static void unmatched_redefinition(const char *type, VALUE cbase, ID id, VALUE old);
18813static void
18814unmatched_redefinition(const char *type, VALUE cbase, ID id, VALUE old)
18815{
18816 VALUE name = rb_id2str(id);
18817 VALUE message = rb_sprintf("%""l""i" "\v"" is not a %s",
18818 name, type);
18819 VALUE location = rb_const_source_location_at(cbase, id);
18820 if (!RB_NIL_P(location)) {
18821 rb_str_catf(message, "\n%""l""i" "\v"":%""l""i" "\v"":"
18822 " previous definition of %""l""i" "\v"" was here",
18823 rb_ary_entry(location, 0), rb_ary_entry(location, 1), name);
18824 }
18825 rb_exc_raise(rb_exc_new_str(rb_eTypeError, message));
18826}
18827static VALUE
18828vm_define_class(ID id, rb_num_t flags, VALUE cbase, VALUE super)
18829{
18830 VALUE klass;
18831 if (((flags) & 0x10) && !RB_TYPE_P(super, RUBY_T_CLASS)) {
18832 rb_raise(rb_eTypeError,
18833 "superclass must be an instance of Class (given an instance of %""l""i" "\v"")",
18834 rb_obj_class(super));
18835 }
18836 vm_check_if_namespace(cbase);
18837 rb_autoload_load(cbase, id);
18838 if ((klass = vm_const_get_under(id, flags, cbase)) != 0) {
18839 if (!vm_check_if_class(id, flags, super, klass))
18840 unmatched_redefinition("class", cbase, id, klass);
18841 return klass;
18842 }
18843 else {
18844 return vm_declare_class(id, flags, cbase, super);
18845 }
18846}
18847static VALUE
18848vm_define_module(ID id, rb_num_t flags, VALUE cbase)
18849{
18850 VALUE mod;
18851 vm_check_if_namespace(cbase);
18852 if ((mod = vm_const_get_under(id, flags, cbase)) != 0) {
18853 if (!vm_check_if_module(id, mod))
18854 unmatched_redefinition("module", cbase, id, mod);
18855 return mod;
18856 }
18857 else {
18858 return vm_declare_module(id, cbase);
18859 }
18860}
18861static VALUE
18862vm_find_or_create_class_by_id(ID id,
18863 rb_num_t flags,
18864 VALUE cbase,
18865 VALUE super)
18866{
18867 rb_vm_defineclass_type_t type = ((rb_vm_defineclass_type_t)(flags) & VM_DEFINECLASS_TYPE_MASK);
18868 switch (type) {
18869 case VM_DEFINECLASS_TYPE_CLASS:
18870 return vm_define_class(id, flags, cbase, super);
18871 case VM_DEFINECLASS_TYPE_SINGLETON_CLASS:
18872 return rb_singleton_class(cbase);
18873 case VM_DEFINECLASS_TYPE_MODULE:
18874 return vm_define_module(id, flags, cbase);
18875 default:
18876 rb_bug("unknown defineclass type: %d", (int)type);
18877 }
18878}
18879static rb_method_visibility_t
18880vm_scope_visibility_get(const rb_execution_context_t *ec)
18881{
18882 const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp);
18883 if (!vm_env_cref_by_cref(cfp->ep)) {
18884 return METHOD_VISI_PUBLIC;
18885 }
18886 else {
18887 return CREF_SCOPE_VISI(vm_ec_cref(ec))->method_visi;
18888 }
18889}
18890static int
18891vm_scope_module_func_check(const rb_execution_context_t *ec)
18892{
18893 const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp);
18894 if (!vm_env_cref_by_cref(cfp->ep)) {
18895 return 0;
18896 }
18897 else {
18898 return CREF_SCOPE_VISI(vm_ec_cref(ec))->module_func;
18899 }
18900}
18901static void
18902vm_define_method(const rb_execution_context_t *ec, VALUE obj, ID id, VALUE iseqval, int is_singleton)
18903{
18904 VALUE klass;
18905 rb_method_visibility_t visi;
18906 rb_cref_t *cref = vm_ec_cref(ec);
18907 if (is_singleton) {
18908 klass = rb_singleton_class(obj);
18909 visi = METHOD_VISI_PUBLIC;
18910 }
18911 else {
18912 klass = CREF_CLASS_FOR_DEFINITION(cref);
18913 visi = vm_scope_visibility_get(ec);
18914 }
18915 if (RB_NIL_P(klass)) {
18916 rb_raise(rb_eTypeError, "no class/module to add method");
18917 }
18918 rb_add_method_iseq(klass, id, (const rb_iseq_t *)iseqval, cref, visi);
18919 if (!is_singleton && vm_scope_module_func_check(ec)) {
18920 klass = rb_singleton_class(klass);
18921 rb_add_method_iseq(klass, id, (const rb_iseq_t *)iseqval, cref, METHOD_VISI_PUBLIC);
18922 }
18923}
18924static VALUE
18925vm_invokeblock_i(struct rb_execution_context_struct *ec,
18926 struct rb_control_frame_struct *reg_cfp,
18927 struct rb_calling_info *calling)
18928{
18929 const struct rb_callinfo *ci = calling->ci;
18930 VALUE block_handler = VM_CF_BLOCK_HANDLER((((reg_cfp))));
18931 if (block_handler == 0) {
18932 rb_vm_localjump_error("no block given (yield)", ((VALUE)RUBY_Qnil), 0);
18933 }
18934 else {
18935 return vm_invoke_block(ec, (((reg_cfp))), calling, ci, 0, block_handler);
18936 }
18937}
18938static const struct rb_callcache *
18939vm_search_method_wrap(const struct rb_control_frame_struct *reg_cfp, struct rb_call_data *cd, VALUE recv)
18940{
18941 return vm_search_method((VALUE)reg_cfp->iseq, cd, recv);
18942}
18943static const struct rb_callcache *
18944vm_search_invokeblock(const struct rb_control_frame_struct *reg_cfp, struct rb_call_data *cd, VALUE recv)
18945{
18946 static const struct rb_callcache cc = {
18947 .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4),
18948 .klass = 0,
18949 .cme_ = 0,
18950 .call_ = vm_invokeblock_i,
18951 .aux_ = {0},
18952 };
18953 return &cc;
18954}
18955static
18956VALUE
18957vm_sendish(
18958 struct rb_execution_context_struct *ec,
18959 struct rb_control_frame_struct *reg_cfp,
18960 struct rb_call_data *cd,
18961 VALUE block_handler,
18962 const struct rb_callcache *(*method_explorer)(const struct rb_control_frame_struct *cfp, struct rb_call_data *cd, VALUE recv)
18963) {
18964 VALUE val = ((VALUE)RUBY_Qundef);
18965 const struct rb_callinfo *ci = cd->ci;
18966 const struct rb_callcache *cc;
18967 int argc = vm_ci_argc(ci);
18968 VALUE recv = (*(((((reg_cfp)->sp)))-(argc)-1));
18969 struct rb_calling_info calling = {
18970 .block_handler = block_handler,
18971 .kw_splat = (vm_ci_flag(ci) & (0x01 << VM_CALL_KW_SPLAT_bit)) > 0,
18972 .recv = recv,
18973 .argc = argc,
18974 .ci = ci,
18975 };
18976 calling.cc = cc = method_explorer((((reg_cfp))), cd, recv);
18977 val = vm_cc_call(cc)(ec, (((reg_cfp))), &calling);
18978 if (val != ((VALUE)RUBY_Qundef)) {
18979 return val;
18980 }
18981 else {
18982 do { (reg_cfp) = ec->cfp; } while (0);
18983 }
18984 if (((((((reg_cfp)))->iseq))->body)->catch_except_p) {
18985 VM_ENV_FLAGS_SET(((((reg_cfp)->ep))), VM_FRAME_FLAG_FINISH);
18986 return rb_vm_exec(ec, 1);
18987 }
18988 else if ((val = mjit_exec(ec)) == ((VALUE)RUBY_Qundef)) {
18989 VM_ENV_FLAGS_SET(((((reg_cfp)->ep))), VM_FRAME_FLAG_FINISH);
18990 return rb_vm_exec(ec, 0);
18991 }
18992 else {
18993 return val;
18994 }
18995}
18996VALUE rb_nil_to_s(VALUE);
18997VALUE rb_true_to_s(VALUE);
18998VALUE rb_false_to_s(VALUE);
18999VALUE rb_int_to_s(int argc, VALUE *argv, VALUE x);
19000VALUE rb_fix_to_s(VALUE);
19001VALUE rb_mod_to_s(VALUE);
19002VALUE rb_mod_name(VALUE);
19003static VALUE
19004vm_objtostring(const rb_iseq_t *iseq, VALUE recv, CALL_DATA cd)
19005{
19006 const struct rb_callcache *cc = vm_search_method((VALUE)iseq, cd, recv);
19007 switch (((int)rb_type(recv))) {
19008 case RUBY_T_STRING:
19009 return recv;
19010 case RUBY_T_SYMBOL:
19011 if (check_cfunc(vm_cc_cme(cc), rb_sym_to_s)) {
19012 return rb_sym2str(recv);
19013 }
19014 break;
19015 case RUBY_T_MODULE:
19016 case RUBY_T_CLASS:
19017 if (check_cfunc(vm_cc_cme(cc), rb_mod_to_s)) {
19018 VALUE val = rb_mod_name(recv);
19019 if (val == ((VALUE)RUBY_Qnil)) {
19020 val = rb_mod_to_s(recv);
19021 }
19022 return val;
19023 }
19024 break;
19025 case RUBY_T_NIL:
19026 if (check_cfunc(vm_cc_cme(cc), rb_nil_to_s)) {
19027 return rb_nil_to_s(recv);
19028 }
19029 break;
19030 case RUBY_T_TRUE:
19031 if (check_cfunc(vm_cc_cme(cc), rb_true_to_s)) {
19032 return rb_true_to_s(recv);
19033 }
19034 break;
19035 case RUBY_T_FALSE:
19036 if (check_cfunc(vm_cc_cme(cc), rb_false_to_s)) {
19037 return rb_false_to_s(recv);
19038 }
19039 break;
19040 case RUBY_T_FIXNUM:
19041 if (check_cfunc(vm_cc_cme(cc), rb_int_to_s)) {
19042 return rb_fix_to_s(recv);
19043 }
19044 break;
19045 }
19046 return ((VALUE)RUBY_Qundef);
19047}
19048static VALUE
19049vm_opt_str_freeze(VALUE str, int bop, ID id)
19050{
19051 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 2))) == 0), 1)))) {
19052 return str;
19053 }
19054 else {
19055 return ((VALUE)RUBY_Qundef);
19056 }
19057}
19058static VALUE
19059vm_opt_newarray_max(rb_execution_context_t *ec, rb_num_t num, const VALUE *ptr)
19060{
19061 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MAX)]&((1 << 3))) == 0), 1)))) {
19062 if (num == 0) {
19063 return ((VALUE)RUBY_Qnil);
19064 }
19065 else {
19066 struct cmp_opt_data cmp_opt = { 0, 0 };
19067 VALUE result = *ptr;
19068 rb_snum_t i = num - 1;
19069 while (i-- > 0) {
19070 const VALUE v = *++ptr;
19071 if (((RB_FIXNUM_P(v) && RB_FIXNUM_P(result) && (((cmp_opt).opt_inited & (1U << cmp_opt_Integer)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Integer)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Integer)), rb_method_basic_definition_p(rb_cInteger, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Integer))))) ? (((long)v > (long)result) ? 1 : ((long)v < (long)result) ? -1 : 0) : ((RB_TYPE_P((v), RUBY_T_STRING) && rb_class_of(v) == rb_cString) && (RB_TYPE_P((result), RUBY_T_STRING) && rb_class_of(result) == rb_cString) && (((cmp_opt).opt_inited & (1U << cmp_opt_String)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_String)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_String)), rb_method_basic_definition_p(rb_cString, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_String))))) ? rb_str_cmp(v, result) : (RB_FLOAT_TYPE_P(v) && RB_FLOAT_TYPE_P(result) && (((cmp_opt).opt_inited & (1U << cmp_opt_Float)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Float)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Float)), rb_method_basic_definition_p(rb_cFloat, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Float))))) ? rb_float_cmp(v, result) : rb_cmpint(rb_funcallv(v, idCmp, 1, &result), v, result)) > 0) {
19072 result = v;
19073 }
19074 }
19075 return result;
19076 }
19077 }
19078 else {
19079 return rb_vm_call_with_refinements(ec, rb_ary_new_from_values(num, ptr), idMax, 0, ((void *)0), 0);
19080 }
19081}
19082static VALUE
19083vm_opt_newarray_min(rb_execution_context_t *ec, rb_num_t num, const VALUE *ptr)
19084{
19085 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MIN)]&((1 << 3))) == 0), 1)))) {
19086 if (num == 0) {
19087 return ((VALUE)RUBY_Qnil);
19088 }
19089 else {
19090 struct cmp_opt_data cmp_opt = { 0, 0 };
19091 VALUE result = *ptr;
19092 rb_snum_t i = num - 1;
19093 while (i-- > 0) {
19094 const VALUE v = *++ptr;
19095 if (((RB_FIXNUM_P(v) && RB_FIXNUM_P(result) && (((cmp_opt).opt_inited & (1U << cmp_opt_Integer)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Integer)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Integer)), rb_method_basic_definition_p(rb_cInteger, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Integer))))) ? (((long)v > (long)result) ? 1 : ((long)v < (long)result) ? -1 : 0) : ((RB_TYPE_P((v), RUBY_T_STRING) && rb_class_of(v) == rb_cString) && (RB_TYPE_P((result), RUBY_T_STRING) && rb_class_of(result) == rb_cString) && (((cmp_opt).opt_inited & (1U << cmp_opt_String)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_String)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_String)), rb_method_basic_definition_p(rb_cString, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_String))))) ? rb_str_cmp(v, result) : (RB_FLOAT_TYPE_P(v) && RB_FLOAT_TYPE_P(result) && (((cmp_opt).opt_inited & (1U << cmp_opt_Float)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Float)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Float)), rb_method_basic_definition_p(rb_cFloat, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Float))))) ? rb_float_cmp(v, result) : rb_cmpint(rb_funcallv(v, idCmp, 1, &result), v, result)) < 0) {
19096 result = v;
19097 }
19098 }
19099 return result;
19100 }
19101 }
19102 else {
19103 return rb_vm_call_with_refinements(ec, rb_ary_new_from_values(num, ptr), idMin, 0, ((void *)0), 0);
19104 }
19105}
19106static VALUE
19107vm_opt_newarray_hash(rb_execution_context_t *ec, rb_num_t num, const VALUE *ptr)
19108{
19109 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_HASH)]&((1 << 3))) == 0), 1)))) {
19110 return rb_ary_hash_values(num, ptr);
19111 }
19112 else {
19113 return rb_vm_call_with_refinements(ec, rb_ary_new_from_values(num, ptr), idHash, 0, ((void *)0), 0);
19114 }
19115}
19116static _Bool
19117vm_ic_compile_i(VALUE *code, VALUE insn, size_t index, void *ic)
19118{
19119 if (insn == YARVINSN_opt_setinlinecache) {
19120 return 0;
19121 }
19122 if (insn == YARVINSN_getconstant) {
19123 ID id = code[index + 1];
19124 struct rb_id_table *const_cache = rb_current_vm()->constant_cache;
19125 VALUE lookup_result;
19126 st_table *ics;
19127 if (rb_id_table_lookup(const_cache, id, &lookup_result)) {
19128 ics = (st_table *)lookup_result;
19129 }
19130 else {
19131 ics = rb_st_init_numtable();
19132 rb_id_table_insert(const_cache, id, (VALUE)ics);
19133 }
19134 rb_st_insert(ics, (st_data_t) ic, (st_data_t) ((VALUE)RUBY_Qtrue));
19135 }
19136 return 1;
19137}
19138static void
19139vm_ic_compile(rb_control_frame_t *cfp, IC ic)
19140{
19141 const rb_iseq_t *iseq = cfp->iseq;
19142 { unsigned int _lev; rb_vm_lock_enter(&_lev, "./vm_insnhelper.c", 4984);;
19143 {
19144 rb_iseq_each(iseq, cfp->pc - ((iseq)->body)->iseq_encoded, vm_ic_compile_i, (void *) ic);
19145 }
19146 rb_vm_lock_leave(&_lev, "./vm_insnhelper.c", 4988); };
19147}
19148static inline _Bool
19149vm_inlined_ic_hit_p(VALUE flags, VALUE value, const rb_cref_t *ic_cref, const VALUE *reg_ep)
19150{
19151 if ((flags & ((VALUE)RUBY_FL_USER4)) || rb_ractor_main_p()) {
19152 ((void)0);
19153 return (ic_cref == ((void *)0) ||
19154 ic_cref == vm_get_cref(reg_ep));
19155 }
19156 return 0;
19157}
19158static _Bool
19159vm_ic_hit_p(const struct iseq_inline_constant_cache_entry *ice, const VALUE *reg_ep)
19160{
19161 ((void)0);
19162 return vm_inlined_ic_hit_p(ice->flags, ice->value, ice->ic_cref, reg_ep);
19163}static inline
19164_Bool
19165rb_vm_ic_hit_p(IC ic, const VALUE *reg_ep)
19166{
19167 return ic->entry && vm_ic_hit_p(ic->entry, reg_ep);
19168}
19169COLDFUNC static void
19170vm_ic_update(const rb_iseq_t *iseq, IC ic, VALUE val, const VALUE *reg_ep) {
19171 if (ruby_vm_const_missing_count > 0) {
19172 ruby_vm_const_missing_count = 0;
19173 ic->entry = ((void *)0);
19174 return;
19175 }
19176 struct iseq_inline_constant_cache_entry *ice = (struct iseq_inline_constant_cache_entry *)rb_imemo_new(imemo_constcache, 0, 0, 0, 0);
19177 rb_obj_write((VALUE)(ice), __extension__({
19178 ;
19179 ; __typeof__((VALUE *)(&ice->value)) unaligned_member_access_result = ((VALUE *)(&ice->value));
19180 ; unaligned_member_access_result; }), (VALUE)(val), "./vm_insnhelper.c", 5028);
19181 ice->ic_cref = vm_get_const_key_cref(reg_ep);
19182 if (rb_ractor_shareable_p(val)) ice->flags |= ((VALUE)RUBY_FL_USER4);
19183 rb_obj_write((VALUE)(iseq), __extension__({
19184 ;
19185 ; __typeof__((VALUE *)(&ic->entry)) unaligned_member_access_result = ((VALUE *)(&ic->entry));
19186 ; unaligned_member_access_result; }), (VALUE)(ice), "./vm_insnhelper.c", 5031);
19187}
19188static VALUE
19189vm_once_dispatch(rb_execution_context_t *ec, ISEQ iseq, ISE is)
19190{
19191 rb_thread_t *th = rb_ec_thread_ptr(ec);
19192 rb_thread_t *const RUNNING_THREAD_ONCE_DONE = (rb_thread_t *)(0x1);
19193 again:
19194 if (is->once.running_thread == RUNNING_THREAD_ONCE_DONE) {
19195 return is->once.value;
19196 }
19197 else if (is->once.running_thread == ((void *)0)) {
19198 VALUE val;
19199 is->once.running_thread = th;
19200 val = rb_ensure(vm_once_exec, (VALUE)iseq, vm_once_clear, (VALUE)is);
19201 rb_obj_write((VALUE)(ec->cfp->iseq), __extension__({
19202;
19203; __typeof__((VALUE *)(&is->once.value)) unaligned_member_access_result = ((VALUE *)(&is->once.value));
19204; unaligned_member_access_result; }), (VALUE)(val), "./vm_insnhelper.c", 5053);
19205 is->once.running_thread = RUNNING_THREAD_ONCE_DONE;
19206 return val;
19207 }
19208 else if (is->once.running_thread == th) {
19209 return vm_once_exec((VALUE)iseq);
19210 }
19211 else {
19212 rb_vm_check_ints(ec);
19213 rb_thread_schedule();
19214 goto again;
19215 }
19216}
19217static OFFSET
19218vm_case_dispatch(CDHASH hash, OFFSET else_offset, VALUE key)
19219{
19220 switch (__extension__({ VALUE arg_obj = (key); RB_SPECIAL_CONST_P(arg_obj) ? -1 : (int)RB_BUILTIN_TYPE(arg_obj); })) {
19221 case -1:
19222 case RUBY_T_FLOAT:
19223 case RUBY_T_SYMBOL:
19224 case RUBY_T_BIGNUM:
19225 case RUBY_T_STRING:
19226 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQQ)]&((1 << 6) | (1 << 0) | (1 << 1) | (1 << 9) | (1 << 10) | (1 << 11) | (1 << 2))) == 0), 1)))) {
19227 st_data_t val;
19228 if (RB_FLOAT_TYPE_P(key)) {
19229 double kval = rb_float_value_inline(key);
19230 if (!__builtin_isinf_sign (kval) && modf(kval, &kval) == 0.0) {
19231 key = (((kval) < (0x7fffffffffffffffL / 2) + 1) && ((kval) >= ((-0x7fffffffffffffffL - 1L) / 2))) ? RB_INT2FIX((long)kval) : rb_dbl2big(kval);
19232 }
19233 }
19234 if (rb_hash_stlike_lookup(hash, key, &val)) {
19235 return rb_fix2long((VALUE)val);
19236 }
19237 else {
19238 return else_offset;
19239 }
19240 }
19241 }
19242 return 0;
19243}
19244__attribute__((__noreturn__)) static void vm_stack_consistency_error(const rb_execution_context_t *ec, const rb_control_frame_t *, const VALUE *);
19245static void
19246vm_stack_consistency_error(const rb_execution_context_t *ec,
19247 const rb_control_frame_t *cfp,
19248 const VALUE *bp)
19249{
19250 const ptrdiff_t nsp = ((cfp->sp) - (ec)->vm_stack);
19251 const ptrdiff_t nbp = ((bp) - (ec)->vm_stack);
19252 static const char stack_consistency_error[] =
19253 "Stack consistency error (sp: %""t""d"", bp: %""t""d"")";
19254 VALUE mesg = rb_sprintf(stack_consistency_error, nsp, nbp);
19255 ((__builtin_constant_p("\n") ? rbimpl_str_cat_cstr : rb_str_cat_cstr) ((mesg), ("\n")));
19256 rb_str_append(mesg, rb_iseq_disasm(cfp->iseq));
19257 rb_exc_fatal(rb_exc_new_str(rb_eFatal, mesg));
19258}
19259ALWAYS_INLINE(static inline VALUE
19260vm_opt_plus(VALUE recv, VALUE obj));
19261static inline VALUE
19262vm_opt_plus(VALUE recv, VALUE obj) {
19263 if (FIXNUM_2_P(recv, obj) &&
19264 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 0))) == 0), 1)))) {
19265 return rb_fix_plus_fix(recv, obj);
19266 }
19267 else if (FLONUM_2_P(recv, obj) &&
19268 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 1))) == 0), 1)))) {
19269 return rb_float_new_inline(rb_float_value_inline(recv) + rb_float_value_inline(obj));
19270 }
19271 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
19272 return ((VALUE)RUBY_Qundef);
19273 }
19274 else if (RBASIC_CLASS(recv) == rb_cFloat &&
19275 RBASIC_CLASS(obj) == rb_cFloat &&
19276 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 1))) == 0), 1)))) {
19277 return rb_float_new_inline(rb_float_value_inline(recv) + rb_float_value_inline(obj));
19278 }
19279 else if (RBASIC_CLASS(recv) == rb_cString &&
19280 RBASIC_CLASS(obj) == rb_cString &&
19281 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 2))) == 0), 1)))) {
19282 return rb_str_opt_plus(recv, obj);
19283 }
19284 else if (RBASIC_CLASS(recv) == rb_cArray &&
19285 RBASIC_CLASS(obj) == rb_cArray &&
19286 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 3))) == 0), 1)))) {
19287 return rb_ary_plus(recv, obj);
19288 }
19289 else {
19290 return ((VALUE)RUBY_Qundef);
19291 }
19292}
19293ALWAYS_INLINE(static inline VALUE
19294vm_opt_minus(VALUE recv, VALUE obj));
19295static inline VALUE
19296vm_opt_minus(VALUE recv, VALUE obj) {
19297 if (FIXNUM_2_P(recv, obj) &&
19298 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MINUS)]&((1 << 0))) == 0), 1)))) {
19299 return rb_fix_minus_fix(recv, obj);
19300 }
19301 else if (FLONUM_2_P(recv, obj) &&
19302 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MINUS)]&((1 << 1))) == 0), 1)))) {
19303 return rb_float_new_inline(rb_float_value_inline(recv) - rb_float_value_inline(obj));
19304 }
19305 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
19306 return ((VALUE)RUBY_Qundef);
19307 }
19308 else if (RBASIC_CLASS(recv) == rb_cFloat &&
19309 RBASIC_CLASS(obj) == rb_cFloat &&
19310 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MINUS)]&((1 << 1))) == 0), 1)))) {
19311 return rb_float_new_inline(rb_float_value_inline(recv) - rb_float_value_inline(obj));
19312 }
19313 else {
19314 return ((VALUE)RUBY_Qundef);
19315 }
19316}
19317ALWAYS_INLINE(static inline VALUE
19318vm_opt_mult(VALUE recv, VALUE obj));
19319static inline VALUE
19320vm_opt_mult(VALUE recv, VALUE obj) {
19321 if (FIXNUM_2_P(recv, obj) &&
19322 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MULT)]&((1 << 0))) == 0), 1)))) {
19323 return rb_fix_mul_fix(recv, obj);
19324 }
19325 else if (FLONUM_2_P(recv, obj) &&
19326 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MULT)]&((1 << 1))) == 0), 1)))) {
19327 return rb_float_new_inline(rb_float_value_inline(recv) * rb_float_value_inline(obj));
19328 }
19329 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
19330 return ((VALUE)RUBY_Qundef);
19331 }
19332 else if (RBASIC_CLASS(recv) == rb_cFloat &&
19333 RBASIC_CLASS(obj) == rb_cFloat &&
19334 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MULT)]&((1 << 1))) == 0), 1)))) {
19335 return rb_float_new_inline(rb_float_value_inline(recv) * rb_float_value_inline(obj));
19336 }
19337 else {
19338 return ((VALUE)RUBY_Qundef);
19339 }
19340}
19341ALWAYS_INLINE(static inline VALUE
19342vm_opt_div(VALUE recv, VALUE obj));
19343static inline VALUE
19344vm_opt_div(VALUE recv, VALUE obj) {
19345 if (FIXNUM_2_P(recv, obj) &&
19346 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_DIV)]&((1 << 0))) == 0), 1)))) {
19347 return (rb_fix2long(obj) == 0) ? ((VALUE)RUBY_Qundef) : rb_fix_div_fix(recv, obj);
19348 }
19349 else if (FLONUM_2_P(recv, obj) &&
19350 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_DIV)]&((1 << 1))) == 0), 1)))) {
19351 return rb_flo_div_flo(recv, obj);
19352 }
19353 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
19354 return ((VALUE)RUBY_Qundef);
19355 }
19356 else if (RBASIC_CLASS(recv) == rb_cFloat &&
19357 RBASIC_CLASS(obj) == rb_cFloat &&
19358 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_DIV)]&((1 << 1))) == 0), 1)))) {
19359 return rb_flo_div_flo(recv, obj);
19360 }
19361 else {
19362 return ((VALUE)RUBY_Qundef);
19363 }
19364}
19365ALWAYS_INLINE(static inline VALUE
19366vm_opt_mod(VALUE recv, VALUE obj));
19367static inline VALUE
19368vm_opt_mod(VALUE recv, VALUE obj) {
19369 if (FIXNUM_2_P(recv, obj) &&
19370 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MOD)]&((1 << 0))) == 0), 1)))) {
19371 return (rb_fix2long(obj) == 0) ? ((VALUE)RUBY_Qundef) : rb_fix_mod_fix(recv, obj);
19372 }
19373 else if (FLONUM_2_P(recv, obj) &&
19374 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MOD)]&((1 << 1))) == 0), 1)))) {
19375 return rb_float_new_inline(ruby_float_mod(rb_float_value_inline(recv), rb_float_value_inline(obj)));
19376 }
19377 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
19378 return ((VALUE)RUBY_Qundef);
19379 }
19380 else if (RBASIC_CLASS(recv) == rb_cFloat &&
19381 RBASIC_CLASS(obj) == rb_cFloat &&
19382 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MOD)]&((1 << 1))) == 0), 1)))) {
19383 return rb_float_new_inline(ruby_float_mod(rb_float_value_inline(recv), rb_float_value_inline(obj)));
19384 }
19385 else {
19386 return ((VALUE)RUBY_Qundef);
19387 }
19388}static inline
19389VALUE
19390rb_vm_opt_mod(VALUE recv, VALUE obj)
19391{
19392 return vm_opt_mod(recv, obj);
19393}
19394ALWAYS_INLINE(static inline VALUE
19395vm_opt_neq(const rb_iseq_t *iseq, CALL_DATA cd, CALL_DATA cd_eq, VALUE recv, VALUE obj));
19396static inline VALUE
19397vm_opt_neq(const rb_iseq_t *iseq, CALL_DATA cd, CALL_DATA cd_eq, VALUE recv, VALUE obj) {
19398 if (vm_method_cfunc_is(iseq, cd, recv, rb_obj_not_equal)) {
19399 VALUE val = opt_equality(iseq, recv, obj, cd_eq);
19400 if (val != ((VALUE)RUBY_Qundef)) {
19401 return ((!RB_TEST(val)) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse));
19402 }
19403 }
19404 return ((VALUE)RUBY_Qundef);
19405}
19406ALWAYS_INLINE(static inline VALUE
19407vm_opt_lt(VALUE recv, VALUE obj));
19408static inline VALUE
19409vm_opt_lt(VALUE recv, VALUE obj) {
19410 if (FIXNUM_2_P(recv, obj) &&
19411 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LT)]&((1 << 0))) == 0), 1)))) {
19412 return (((long)recv < (long)obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse));
19413 }
19414 else if (FLONUM_2_P(recv, obj) &&
19415 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LT)]&((1 << 1))) == 0), 1)))) {
19416 return ((rb_float_value_inline(recv) < rb_float_value_inline(obj)) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse));
19417 }
19418 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
19419 return ((VALUE)RUBY_Qundef);
19420 }
19421 else if (RBASIC_CLASS(recv) == rb_cFloat &&
19422 RBASIC_CLASS(obj) == rb_cFloat &&
19423 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LT)]&((1 << 1))) == 0), 1)))) {
19424 ;
19425 return ((rb_float_value_inline(recv) < rb_float_value_inline(obj)) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse));
19426 }
19427 else {
19428 return ((VALUE)RUBY_Qundef);
19429 }
19430}
19431ALWAYS_INLINE(static inline VALUE
19432vm_opt_le(VALUE recv, VALUE obj));
19433static inline VALUE
19434vm_opt_le(VALUE recv, VALUE obj) {
19435 if (FIXNUM_2_P(recv, obj) &&
19436 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LE)]&((1 << 0))) == 0), 1)))) {
19437 return (((long)recv <= (long)obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse));
19438 }
19439 else if (FLONUM_2_P(recv, obj) &&
19440 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LE)]&((1 << 1))) == 0), 1)))) {
19441 return ((rb_float_value_inline(recv) <= rb_float_value_inline(obj)) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse));
19442 }
19443 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
19444 return ((VALUE)RUBY_Qundef);
19445 }
19446 else if (RBASIC_CLASS(recv) == rb_cFloat &&
19447 RBASIC_CLASS(obj) == rb_cFloat &&
19448 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LE)]&((1 << 1))) == 0), 1)))) {
19449 ;
19450 return ((rb_float_value_inline(recv) <= rb_float_value_inline(obj)) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse));
19451 }
19452 else {
19453 return ((VALUE)RUBY_Qundef);
19454 }
19455}
19456ALWAYS_INLINE(static inline VALUE
19457vm_opt_gt(VALUE recv, VALUE obj));
19458static inline VALUE
19459vm_opt_gt(VALUE recv, VALUE obj) {
19460 if (FIXNUM_2_P(recv, obj) &&
19461 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GT)]&((1 << 0))) == 0), 1)))) {
19462 return (((long)recv > (long)obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse));
19463 }
19464 else if (FLONUM_2_P(recv, obj) &&
19465 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GT)]&((1 << 1))) == 0), 1)))) {
19466 return ((rb_float_value_inline(recv) > rb_float_value_inline(obj)) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse));
19467 }
19468 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
19469 return ((VALUE)RUBY_Qundef);
19470 }
19471 else if (RBASIC_CLASS(recv) == rb_cFloat &&
19472 RBASIC_CLASS(obj) == rb_cFloat &&
19473 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GT)]&((1 << 1))) == 0), 1)))) {
19474 ;
19475 return ((rb_float_value_inline(recv) > rb_float_value_inline(obj)) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse));
19476 }
19477 else {
19478 return ((VALUE)RUBY_Qundef);
19479 }
19480}
19481ALWAYS_INLINE(static inline VALUE
19482vm_opt_ge(VALUE recv, VALUE obj));
19483static inline VALUE
19484vm_opt_ge(VALUE recv, VALUE obj) {
19485 if (FIXNUM_2_P(recv, obj) &&
19486 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GE)]&((1 << 0))) == 0), 1)))) {
19487 return (((long)recv >= (long)obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse));
19488 }
19489 else if (FLONUM_2_P(recv, obj) &&
19490 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GE)]&((1 << 1))) == 0), 1)))) {
19491 return ((rb_float_value_inline(recv) >= rb_float_value_inline(obj)) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse));
19492 }
19493 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
19494 return ((VALUE)RUBY_Qundef);
19495 }
19496 else if (RBASIC_CLASS(recv) == rb_cFloat &&
19497 RBASIC_CLASS(obj) == rb_cFloat &&
19498 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GE)]&((1 << 1))) == 0), 1)))) {
19499 ;
19500 return ((rb_float_value_inline(recv) >= rb_float_value_inline(obj)) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse));
19501 }
19502 else {
19503 return ((VALUE)RUBY_Qundef);
19504 }
19505}
19506ALWAYS_INLINE(static inline VALUE
19507vm_opt_ltlt(VALUE recv, VALUE obj));
19508static inline VALUE
19509vm_opt_ltlt(VALUE recv, VALUE obj) {
19510 if (RB_SPECIAL_CONST_P(recv)) {
19511 return ((VALUE)RUBY_Qundef);
19512 }
19513 else if (RBASIC_CLASS(recv) == rb_cString &&
19514 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LTLT)]&((1 << 2))) == 0), 1)))) {
19515 return rb_str_concat(recv, obj);
19516 }
19517 else if (RBASIC_CLASS(recv) == rb_cArray &&
19518 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LTLT)]&((1 << 3))) == 0), 1)))) {
19519 return rb_ary_push(recv, obj);
19520 }
19521 else {
19522 return ((VALUE)RUBY_Qundef);
19523 }
19524}
19525ALWAYS_INLINE(static inline VALUE
19526vm_opt_and(VALUE recv, VALUE obj));
19527static inline VALUE
19528vm_opt_and(VALUE recv, VALUE obj) {
19529 VALUE ret = ((long) recv) & ((long) obj);
19530 if (RB_FIXNUM_P(ret) &&
19531 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AND)]&((1 << 0))) == 0), 1)))) {
19532 return ret;
19533 }
19534 else {
19535 return ((VALUE)RUBY_Qundef);
19536 }
19537}
19538ALWAYS_INLINE(static inline VALUE
19539vm_opt_or(VALUE recv, VALUE obj));
19540static inline VALUE
19541vm_opt_or(VALUE recv, VALUE obj) {
19542 if (FIXNUM_2_P(recv, obj) &&
19543 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_OR)]&((1 << 0))) == 0), 1)))) {
19544 return recv | obj;
19545 }
19546 else {
19547 return ((VALUE)RUBY_Qundef);
19548 }
19549}
19550ALWAYS_INLINE(static inline VALUE
19551vm_opt_aref(VALUE recv, VALUE obj));
19552static inline VALUE
19553vm_opt_aref(VALUE recv, VALUE obj) {
19554 if (RB_SPECIAL_CONST_P(recv)) {
19555 if (FIXNUM_2_P(recv, obj) &&
19556 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 0))) == 0), 1)))) {
19557 return rb_fix_aref(recv, obj);
19558 }
19559 return ((VALUE)RUBY_Qundef);
19560 }
19561 else if (RBASIC_CLASS(recv) == rb_cArray &&
19562 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 3))) == 0), 1)))) {
19563 if (RB_FIXNUM_P(obj)) {
19564 return rb_ary_entry_internal(recv, rb_fix2long(obj));
19565 }
19566 else {
19567 return rb_ary_aref1(recv, obj);
19568 }
19569 }
19570 else if (RBASIC_CLASS(recv) == rb_cHash &&
19571 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 4))) == 0), 1)))) {
19572 return rb_hash_aref(recv, obj);
19573 }
19574 else {
19575 return ((VALUE)RUBY_Qundef);
19576 }
19577}
19578ALWAYS_INLINE(static inline VALUE
19579vm_opt_aset(VALUE recv, VALUE obj, VALUE set));
19580static inline VALUE
19581vm_opt_aset(VALUE recv, VALUE obj, VALUE set) {
19582 if (RB_SPECIAL_CONST_P(recv)) {
19583 return ((VALUE)RUBY_Qundef);
19584 }
19585 else if (RBASIC_CLASS(recv) == rb_cArray &&
19586 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_ASET)]&((1 << 3))) == 0), 1))) &&
19587 RB_FIXNUM_P(obj)) {
19588 rb_ary_store(recv, rb_fix2long(obj), set);
19589 return set;
19590 }
19591 else if (RBASIC_CLASS(recv) == rb_cHash &&
19592 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_ASET)]&((1 << 4))) == 0), 1)))) {
19593 rb_hash_aset(recv, obj, set);
19594 return set;
19595 }
19596 else {
19597 return ((VALUE)RUBY_Qundef);
19598 }
19599}
19600ALWAYS_INLINE(static inline VALUE
19601vm_opt_aref_with(VALUE recv, VALUE key));
19602static inline VALUE
19603vm_opt_aref_with(VALUE recv, VALUE key) {
19604 if (!RB_SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash &&
19605 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 4))) == 0), 1))) &&
19606 rb_hash_compare_by_id_p(recv) == ((VALUE)RUBY_Qfalse)) {
19607 return rb_hash_aref(recv, key);
19608 }
19609 else {
19610 return ((VALUE)RUBY_Qundef);
19611 }
19612}
19613ALWAYS_INLINE(static inline VALUE
19614vm_opt_aset_with(VALUE recv, VALUE key, VALUE val));
19615static inline VALUE
19616vm_opt_aset_with(VALUE recv, VALUE key, VALUE val) {
19617 if (!RB_SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash &&
19618 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_ASET)]&((1 << 4))) == 0), 1))) &&
19619 rb_hash_compare_by_id_p(recv) == ((VALUE)RUBY_Qfalse)) {
19620 return rb_hash_aset(recv, key, val);
19621 }
19622 else {
19623 return ((VALUE)RUBY_Qundef);
19624 }
19625}
19626static VALUE
19627vm_opt_length(VALUE recv, int bop)
19628{
19629 if (RB_SPECIAL_CONST_P(recv)) {
19630 return ((VALUE)RUBY_Qundef);
19631 }
19632 else if (RBASIC_CLASS(recv) == rb_cString &&
19633 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 2))) == 0), 1)))) {
19634 if (bop == BOP_EMPTY_P) {
19635 return rb_long2num_inline(RSTRING_LEN(recv));
19636 }
19637 else {
19638 return rb_str_length(recv);
19639 }
19640 }
19641 else if (RBASIC_CLASS(recv) == rb_cArray &&
19642 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 3))) == 0), 1)))) {
19643 return rb_long2num_inline(rb_array_len(recv));
19644 }
19645 else if (RBASIC_CLASS(recv) == rb_cHash &&
19646 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 4))) == 0), 1)))) {
19647 return __builtin_choose_expr( __builtin_constant_p(RHASH_SIZE(recv)), ((VALUE)(RHASH_SIZE(recv))) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(RHASH_SIZE(recv)));
19648 }
19649 else {
19650 return ((VALUE)RUBY_Qundef);
19651 }
19652}
19653static VALUE
19654vm_opt_empty_p(VALUE recv)
19655{
19656 switch (vm_opt_length(recv, BOP_EMPTY_P)) {
19657 case ((VALUE)RUBY_Qundef): return ((VALUE)RUBY_Qundef);
19658 case __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0)): return ((VALUE)RUBY_Qtrue);
19659 default: return ((VALUE)RUBY_Qfalse);
19660 }
19661}
19662VALUE rb_false(VALUE obj);
19663static VALUE
19664vm_opt_nil_p(const rb_iseq_t *iseq, CALL_DATA cd, VALUE recv)
19665{
19666 if (RB_NIL_P(recv) &&
19667 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_NIL_P)]&((1 << 9))) == 0), 1)))) {
19668 return ((VALUE)RUBY_Qtrue);
19669 }
19670 else if (vm_method_cfunc_is(iseq, cd, recv, rb_false)) {
19671 return ((VALUE)RUBY_Qfalse);
19672 }
19673 else {
19674 return ((VALUE)RUBY_Qundef);
19675 }
19676}
19677static VALUE
19678fix_succ(VALUE x)
19679{
19680 switch (x) {
19681 case ~0UL:
19682 return __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0));
19683 case ((~0UL)>>(int)(1)):
19684 return rb_uint2big(1UL << (8 * 8 - 2));
19685 default:
19686 return x + 2;
19687 }
19688}
19689static VALUE
19690vm_opt_succ(VALUE recv)
19691{
19692 if (RB_FIXNUM_P(recv) &&
19693 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_SUCC)]&((1 << 0))) == 0), 1)))) {
19694 return fix_succ(recv);
19695 }
19696 else if (RB_SPECIAL_CONST_P(recv)) {
19697 return ((VALUE)RUBY_Qundef);
19698 }
19699 else if (RBASIC_CLASS(recv) == rb_cString &&
19700 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_SUCC)]&((1 << 2))) == 0), 1)))) {
19701 return rb_str_succ(recv);
19702 }
19703 else {
19704 return ((VALUE)RUBY_Qundef);
19705 }
19706}
19707ALWAYS_INLINE(static inline VALUE
19708vm_opt_not(const rb_iseq_t *iseq, CALL_DATA cd, VALUE recv));
19709static inline VALUE
19710vm_opt_not(const rb_iseq_t *iseq, CALL_DATA cd, VALUE recv) {
19711 if (vm_method_cfunc_is(iseq, cd, recv, rb_obj_not)) {
19712 return ((!RB_TEST(recv)) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse));
19713 }
19714 else {
19715 return ((VALUE)RUBY_Qundef);
19716 }
19717}
19718static VALUE
19719vm_opt_regexpmatch2(VALUE recv, VALUE obj)
19720{
19721 if (RB_SPECIAL_CONST_P(recv)) {
19722 return ((VALUE)RUBY_Qundef);
19723 }
19724 else if (RBASIC_CLASS(recv) == rb_cString &&
19725 rb_class_of(obj) == rb_cRegexp &&
19726 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MATCH)]&((1 << 2))) == 0), 1)))) {
19727 return rb_reg_match(obj, recv);
19728 }
19729 else if (RBASIC_CLASS(recv) == rb_cRegexp &&
19730 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MATCH)]&((1 << 8))) == 0), 1)))) {
19731 return rb_reg_match(recv, obj);
19732 }
19733 else {
19734 return ((VALUE)RUBY_Qundef);
19735 }
19736}
19737rb_event_flag_t rb_iseq_event_flags(const rb_iseq_t *iseq, size_t pos);
19738__attribute__((__noinline__)) static void vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp);
19739static inline void
19740vm_trace_hook(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE *pc,
19741 rb_event_flag_t pc_events, rb_event_flag_t target_event,
19742 rb_hook_list_t *global_hooks, rb_hook_list_t *const *local_hooks_ptr, VALUE val)
19743{
19744 rb_event_flag_t event = pc_events & target_event;
19745 VALUE self = (((((reg_cfp)))->self));
19746 ((void)0);
19747 if (event & global_hooks->events) {
19748 reg_cfp->pc++;
19749 vm_dtrace(event, ec);
19750 rb_exec_event_hook_orig(ec, global_hooks, event, self, 0, 0, 0 , val, 0);
19751 reg_cfp->pc--;
19752 }
19753 rb_hook_list_t *local_hooks = *local_hooks_ptr;
19754 if (local_hooks != ((void *)0)) {
19755 if (event & local_hooks->events) {
19756 reg_cfp->pc++;
19757 rb_exec_event_hook_orig(ec, local_hooks, event, self, 0, 0, 0 , val, 0);
19758 reg_cfp->pc--;
19759 }
19760 }
19761}static inline
19762_Bool
19763rb_vm_opt_cfunc_p(CALL_CACHE cc, int insn)
19764{
19765 switch (insn) {
19766 case YARVINSN_opt_eq:
19767 return check_cfunc(vm_cc_cme(cc), rb_obj_equal);
19768 case YARVINSN_opt_nil_p:
19769 return check_cfunc(vm_cc_cme(cc), rb_false);
19770 case YARVINSN_opt_not:
19771 return check_cfunc(vm_cc_cme(cc), rb_obj_not);
19772 default:
19773 return 0;
19774 }
19775}
19776static void
19777vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp)
19778{
19779 const VALUE *pc = reg_cfp->pc;
19780 rb_event_flag_t enabled_flags = ruby_vm_event_flags & (0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010| 0x0020| 0x0040| 0x0100| 0x0200| 0x010000| 0x020000);
19781 rb_event_flag_t global_events = enabled_flags;
19782 if (enabled_flags == 0 && ruby_vm_event_local_num == 0) {
19783 return;
19784 }
19785 else {
19786 const rb_iseq_t *iseq = reg_cfp->iseq;
19787 VALUE iseq_val = (VALUE)iseq;
19788 size_t pos = pc - ((iseq)->body)->iseq_encoded;
19789 rb_event_flag_t pc_events = rb_iseq_event_flags(iseq, pos);
19790 rb_hook_list_t *local_hooks = iseq->aux.exec.local_hooks;
19791 rb_hook_list_t *const *local_hooks_ptr = &iseq->aux.exec.local_hooks;
19792 rb_event_flag_t iseq_local_events = local_hooks != ((void *)0) ? local_hooks->events : 0;
19793 rb_hook_list_t *bmethod_local_hooks = ((void *)0);
19794 rb_hook_list_t **bmethod_local_hooks_ptr = ((void *)0);
19795 rb_event_flag_t bmethod_local_events = 0;
19796 const _Bool bmethod_frame = VM_FRAME_BMETHOD_P(reg_cfp);
19797 enabled_flags |= iseq_local_events;
19798 ((void)0);
19799 if (bmethod_frame) {
19800 const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(reg_cfp);
19801 ((void)0);
19802 bmethod_local_hooks = me->def->body.bmethod.hooks;
19803 bmethod_local_hooks_ptr = &me->def->body.bmethod.hooks;
19804 if (bmethod_local_hooks) {
19805 bmethod_local_events = bmethod_local_hooks->events;
19806 }
19807 }
19808 if ((pc_events & enabled_flags) == 0 && !bmethod_frame) {
19809 return;
19810 }
19811 else if (ec->trace_arg != ((void *)0)) {
19812 return;
19813 }
19814 else {
19815 rb_hook_list_t *global_hooks = rb_ec_ractor_hooks(ec);
19816 rb_event_flag_t bmethod_events = global_events | bmethod_local_events;
19817 if (0) {
19818 ruby_debug_printf("vm_trace>>%4d (%4x) - %s:%d %s\n",
19819 (int)pos,
19820 (int)pc_events,
19821 RSTRING_PTR(rb_iseq_path(iseq)),
19822 (int)rb_iseq_line_no(iseq, pos),
19823 RSTRING_PTR(rb_iseq_label(iseq)));
19824 }
19825 ((void)0);
19826 ((void)0);
19827 if ((pc_events & 0x0100) && bmethod_frame && (bmethod_events & 0x0008)) {
19828 vm_trace_hook(ec, reg_cfp, pc, 0x0008, 0x0008, global_hooks, bmethod_local_hooks_ptr, ((VALUE)RUBY_Qundef));
19829 }
19830 do { if ((pc_events & (0x0002 | 0x0008 | 0x0100)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x0002 | 0x0008 | 0x0100), global_hooks, local_hooks_ptr, (((VALUE)RUBY_Qundef))); } } while (0);
19831 do { if ((pc_events & (0x0001)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x0001), global_hooks, local_hooks_ptr, (((VALUE)RUBY_Qundef))); } } while (0);
19832 do { if ((pc_events & (0x010000)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x010000), global_hooks, local_hooks_ptr, (((VALUE)RUBY_Qundef))); } } while (0);
19833 do { if ((pc_events & (0x020000)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x020000), global_hooks, local_hooks_ptr, (((VALUE)RUBY_Qundef))); } } while (0);
19834 do { if ((pc_events & (0x0004 | 0x0010 | 0x0200)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x0004 | 0x0010 | 0x0200), global_hooks, local_hooks_ptr, ((*(((((reg_cfp)->sp)))-(0)-1)))); } } while (0);
19835 if ((pc_events & 0x0200) && bmethod_frame && (bmethod_events & 0x0010)) {
19836 vm_trace_hook(ec, reg_cfp, pc, 0x0010, 0x0010, global_hooks, bmethod_local_hooks_ptr, (*(((((reg_cfp)->sp)))-(0)-1)));
19837 }
19838 (*__extension__ ({ volatile VALUE *rb_gc_guarded_ptr = &(iseq_val); __asm__("" : : "m"(rb_gc_guarded_ptr)); rb_gc_guarded_ptr; }));
19839 }
19840 }
19841}static inline
19842void Init_vm_stack_canary(void) { }
19843static VALUE
19844builtin_invoker0(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
19845{
19846 typedef VALUE (*rb_invoke_funcptr0_t)(rb_execution_context_t *ec, VALUE self);
19847 return (*(rb_invoke_funcptr0_t)funcptr)(ec, self);
19848}
19849static VALUE
19850builtin_invoker1(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
19851{
19852 typedef VALUE (*rb_invoke_funcptr1_t)(rb_execution_context_t *ec, VALUE self, VALUE v1);
19853 return (*(rb_invoke_funcptr1_t)funcptr)(ec, self, argv[0]);
19854}
19855static VALUE
19856builtin_invoker2(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
19857{
19858 typedef VALUE (*rb_invoke_funcptr2_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2);
19859 return (*(rb_invoke_funcptr2_t)funcptr)(ec, self, argv[0], argv[1]);
19860}
19861static VALUE
19862builtin_invoker3(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
19863{
19864 typedef VALUE (*rb_invoke_funcptr3_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3);
19865 return (*(rb_invoke_funcptr3_t)funcptr)(ec, self, argv[0], argv[1], argv[2]);
19866}
19867static VALUE
19868builtin_invoker4(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
19869{
19870 typedef VALUE (*rb_invoke_funcptr4_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4);
19871 return (*(rb_invoke_funcptr4_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3]);
19872}
19873static VALUE
19874builtin_invoker5(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
19875{
19876 typedef VALUE (*rb_invoke_funcptr5_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5);
19877 return (*(rb_invoke_funcptr5_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4]);
19878}
19879static VALUE
19880builtin_invoker6(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
19881{
19882 typedef VALUE (*rb_invoke_funcptr6_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6);
19883 return (*(rb_invoke_funcptr6_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]);
19884}
19885static VALUE
19886builtin_invoker7(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
19887{
19888 typedef VALUE (*rb_invoke_funcptr7_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7);
19889 return (*(rb_invoke_funcptr7_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]);
19890}
19891static VALUE
19892builtin_invoker8(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
19893{
19894 typedef VALUE (*rb_invoke_funcptr8_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8);
19895 return (*(rb_invoke_funcptr8_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]);
19896}
19897static VALUE
19898builtin_invoker9(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
19899{
19900 typedef VALUE (*rb_invoke_funcptr9_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9);
19901 return (*(rb_invoke_funcptr9_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8]);
19902}
19903static VALUE
19904builtin_invoker10(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
19905{
19906 typedef VALUE (*rb_invoke_funcptr10_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10);
19907 return (*(rb_invoke_funcptr10_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9]);
19908}
19909static VALUE
19910builtin_invoker11(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
19911{
19912 typedef VALUE (*rb_invoke_funcptr11_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11);
19913 return (*(rb_invoke_funcptr11_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10]);
19914}
19915static VALUE
19916builtin_invoker12(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
19917{
19918 typedef VALUE (*rb_invoke_funcptr12_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12);
19919 return (*(rb_invoke_funcptr12_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11]);
19920}
19921static VALUE
19922builtin_invoker13(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
19923{
19924 typedef VALUE (*rb_invoke_funcptr13_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12, VALUE v13);
19925 return (*(rb_invoke_funcptr13_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12]);
19926}
19927static VALUE
19928builtin_invoker14(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
19929{
19930 typedef VALUE (*rb_invoke_funcptr14_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12, VALUE v13, VALUE v14);
19931 return (*(rb_invoke_funcptr14_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13]);
19932}
19933static VALUE
19934builtin_invoker15(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
19935{
19936 typedef VALUE (*rb_invoke_funcptr15_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12, VALUE v13, VALUE v14, VALUE v15);
19937 return (*(rb_invoke_funcptr15_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14]);
19938}
19939typedef VALUE (*builtin_invoker)(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr);
19940static builtin_invoker
19941lookup_builtin_invoker(int argc)
19942{
19943 static const builtin_invoker invokers[] = {
19944 builtin_invoker0,
19945 builtin_invoker1,
19946 builtin_invoker2,
19947 builtin_invoker3,
19948 builtin_invoker4,
19949 builtin_invoker5,
19950 builtin_invoker6,
19951 builtin_invoker7,
19952 builtin_invoker8,
19953 builtin_invoker9,
19954 builtin_invoker10,
19955 builtin_invoker11,
19956 builtin_invoker12,
19957 builtin_invoker13,
19958 builtin_invoker14,
19959 builtin_invoker15,
19960 };
19961 return invokers[argc];
19962}
19963static inline VALUE
19964invoke_bf(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const struct rb_builtin_function* bf, const VALUE *argv)
19965{
19966 const _Bool canary_p = ((reg_cfp->iseq)->body)->builtin_inline_p;
19967 if (canary_p) {} else {};
19968 VALUE ret = (*lookup_builtin_invoker(bf->argc))(ec, reg_cfp->self, argv, (rb_insn_func_t)bf->func_ptr);
19969 if (canary_p) {(void)(YARVINSN_invokebuiltin);};
19970 return ret;
19971}
19972static VALUE
19973vm_invoke_builtin(rb_execution_context_t *ec, rb_control_frame_t *cfp, const struct rb_builtin_function* bf, const VALUE *argv)
19974{
19975 return invoke_bf(ec, cfp, bf, argv);
19976}
19977static VALUE
19978vm_invoke_builtin_delegate(rb_execution_context_t *ec, rb_control_frame_t *cfp, const struct rb_builtin_function *bf, unsigned int start_index)
19979{
19980 if (0) {
19981 fputs("vm_invoke_builtin_delegate: passing -> ", stderr);
19982 for (int i=0; i<bf->argc; i++) {
19983 ruby_debug_printf(":%s ", rb_id2name(((cfp->iseq)->body)->local_table[i+start_index]));
19984 }
19985 ruby_debug_printf("\n" "%s %s(%d):%p\n", __func__, bf->name, bf->argc, bf->func_ptr);
19986 }
19987 if (bf->argc == 0) {
19988 return invoke_bf(ec, cfp, bf, ((void *)0));
19989 }
19990 else {
19991 const VALUE *argv = cfp->ep - ((cfp->iseq)->body)->local_table_size - ( 3) + 1 + start_index;
19992 return invoke_bf(ec, cfp, bf, argv);
19993 }
19994}static inline
19995VALUE
19996rb_vm_lvar_exposed(rb_execution_context_t *ec, int index)
19997{
19998 const rb_control_frame_t *cfp = ec->cfp;
19999 return cfp->ep[index];
20000}
20001struct local_var_list {
20002 VALUE tbl;
20003};
20004static inline VALUE method_missing(rb_execution_context_t *ec, VALUE obj, ID id, int argc, const VALUE *argv, enum method_missing_reason call_status, int kw_splat);
20005static inline VALUE vm_yield_with_cref(rb_execution_context_t *ec, int argc, const VALUE *argv, int kw_splat, const rb_cref_t *cref, int is_lambda);
20006static inline VALUE vm_yield(rb_execution_context_t *ec, int argc, const VALUE *argv, int kw_splat);
20007static inline VALUE vm_yield_with_block(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE block_handler, int kw_splat);
20008static inline VALUE vm_yield_force_blockarg(rb_execution_context_t *ec, VALUE args);
20009VALUE rb_vm_exec(rb_execution_context_t *ec, _Bool mjit_enable_p);
20010static void vm_set_eval_stack(rb_execution_context_t * th, const rb_iseq_t *iseq, const rb_cref_t *cref, const struct rb_block *base_block);
20011static int vm_collect_local_variables_in_heap(const VALUE *dfp, const struct local_var_list *vars);
20012static VALUE rb_eUncaughtThrow;
20013static ID id_result, id_tag, id_value;
20014typedef enum call_type {
20015 CALL_PUBLIC,
20016 CALL_FCALL,
20017 CALL_VCALL,
20018 CALL_PUBLIC_KW,
20019 CALL_FCALL_KW,
20020 CALL_TYPE_MAX
20021} call_type;
20022static VALUE send_internal(int argc, const VALUE *argv, VALUE recv, call_type scope);
20023static VALUE vm_call0_body(rb_execution_context_t* ec, struct rb_calling_info *calling, const VALUE *argv);
20024static inline void
20025stack_check(rb_execution_context_t *ec)
20026{
20027 if (!(((ec)->raised_flag & (RAISED_STACKOVERFLOW)) != 0) &&
20028 rb_ec_stack_check(ec)) {
20029 ((ec)->raised_flag |= (RAISED_STACKOVERFLOW));
20030 rb_ec_stack_overflow(ec, 0);
20031 }
20032}
20033static void
20034raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE obj,
20035 enum method_missing_reason last_call_status)
20036{
20037 VALUE exc = rb_eNoMethodError;
20038 VALUE format = 0;
20039 if ((__builtin_expect(!!(argc == 0), 0))) {
20040 rb_raise(rb_eArgError, "no method name given");
20041 }
20042 else if ((__builtin_expect(!!(!RB_SYMBOL_P(argv[0])), 0))) {
20043 const VALUE e = rb_eArgError;
20044 rb_raise(e, "method name must be a Symbol but %""l""i" "\v"" is given",
20045 rb_obj_class(argv[0]));
20046 }
20047 stack_check(ec);
20048 if (last_call_status & MISSING_PRIVATE) {
20049 format = rb_fstring_new(("private method `%s' called for %s%s%s"), (sizeof("private method `%s' called for %s%s%s" "") - 1));
20050 }
20051 else if (last_call_status & MISSING_PROTECTED) {
20052 format = rb_fstring_new(("protected method `%s' called for %s%s%s"), (sizeof("protected method `%s' called for %s%s%s" "") - 1));
20053 }
20054 else if (last_call_status & MISSING_VCALL) {
20055 format = rb_fstring_new(("undefined local variable or method `%s' for %s%s%s"), (sizeof("undefined local variable or method `%s' for %s%s%s" "") - 1));
20056 exc = rb_eNameError;
20057 }
20058 else if (last_call_status & MISSING_SUPER) {
20059 format = rb_fstring_new(("super: no superclass method `%s' for %s%s%s"), (sizeof("super: no superclass method `%s' for %s%s%s" "") - 1));
20060 }
20061 {
20062 exc = rb_make_no_method_exception(exc, format, obj, argc, argv,
20063 last_call_status & (MISSING_FCALL|MISSING_VCALL));
20064 if (!(last_call_status & MISSING_MISSING)) {
20065 rb_vm_pop_cfunc_frame();
20066 }
20067 rb_exc_raise(exc);
20068 }
20069}
20070static void
20071vm_raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv,
20072 VALUE obj, int call_status)
20073{
20074 vm_passed_block_handler_set(ec, 0);
20075 raise_method_missing(ec, argc, argv, obj, call_status | MISSING_MISSING);
20076}
20077static inline VALUE
20078method_missing(rb_execution_context_t *ec, VALUE obj, ID id, int argc, const VALUE *argv, enum method_missing_reason call_status, int kw_splat)
20079{
20080 VALUE *nargv, result, work, klass;
20081 VALUE block_handler = vm_passed_block_handler(ec);
20082 const rb_callable_method_entry_t *me;
20083 ec->method_missing_reason = call_status;
20084 if (id == idMethodMissing) {
20085 goto missing;
20086 }
20087 nargv = ((VALUE *) (((size_t)(argc + 1) < 1024 / sizeof(VALUE)) ? ((work) = 0, __builtin_alloca ((argc + 1) * sizeof(VALUE))) : rb_alloc_tmp_buffer2(&(work), (argc + 1), sizeof(VALUE))));
20088 nargv[0] = rb_id2sym(id);
20089 if (!argv) {
20090 static const VALUE buf = ((VALUE)RUBY_Qfalse);
20091 ((void)0);
20092 argv = &buf;
20093 }
20094 ruby_nonempty_memcpy((nargv + 1), (argv), rbimpl_size_mul_or_raise(sizeof(VALUE), (argc)));
20095 ++argc;
20096 argv = nargv;
20097 klass = rb_class_of(obj);
20098 if (!klass) goto missing;
20099 me = rb_callable_method_entry(klass, idMethodMissing);
20100 if (!me || (int) (((me)->flags & (((VALUE)RUBY_FL_USER6) )) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+2))) goto missing;
20101 vm_passed_block_handler_set(ec, block_handler);
20102 result = rb_vm_call_kw(ec, obj, idMethodMissing, argc, argv, me, kw_splat);
20103 if (work) rb_free_tmp_buffer(&(work));
20104 return result;
20105 missing:
20106 raise_method_missing(ec, argc, argv, obj, call_status | MISSING_MISSING);
20107 __builtin_unreachable();
20108}
20109static rb_control_frame_t *
20110vm_get_ruby_level_caller_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
20111{
20112 if (VM_FRAME_RUBYFRAME_P(cfp)) {
20113 return (rb_control_frame_t *)cfp;
20114 }
20115 cfp = ((cfp)+1);
20116 while (!RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(ec, cfp)) {
20117 if (VM_FRAME_RUBYFRAME_P(cfp)) {
20118 return (rb_control_frame_t *)cfp;
20119 }
20120 if (VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_PASSED) == 0) {
20121 break;
20122 }
20123 cfp = ((cfp)+1);
20124 }
20125 return 0;
20126}
20127static void
20128rb_vm_pop_cfunc_frame(void)
20129{
20130 rb_execution_context_t *ec = rb_current_execution_context(1);
20131 rb_control_frame_t *cfp = ec->cfp;
20132 const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(cfp);
20133 do { const rb_event_flag_t flag_arg_ = (0x0040); rb_hook_list_t *hooks_arg_ = (rb_ec_ractor_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, cfp->self, me->def->original_id, me->called_id, me->owner, ((VALUE)RUBY_Qnil), 0); } } while (0);
20134 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, me->owner, me->def->original_id, &args)) { do {} while (0); } } } while (0);
20135 vm_pop_frame(ec, cfp, cfp->ep);
20136}
20137static VALUE
20138vm_call_iseq_setup_normal_0start_0params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20139{
20140 ((void)0);
20141 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 0, 0);
20142}
20143static VALUE
20144vm_call_iseq_setup_normal_0start_0params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20145{
20146 ((void)0);
20147 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 0, 1);
20148}
20149static VALUE
20150vm_call_iseq_setup_normal_0start_0params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20151{
20152 ((void)0);
20153 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 0, 2);
20154}
20155static VALUE
20156vm_call_iseq_setup_normal_0start_0params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20157{
20158 ((void)0);
20159 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 0, 3);
20160}
20161static VALUE
20162vm_call_iseq_setup_normal_0start_0params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20163{
20164 ((void)0);
20165 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 0, 4);
20166}
20167static VALUE
20168vm_call_iseq_setup_normal_0start_0params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20169{
20170 ((void)0);
20171 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 0, 5);
20172}
20173static VALUE
20174vm_call_iseq_setup_normal_0start_1params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20175{
20176 ((void)0);
20177 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 1, 0);
20178}
20179static VALUE
20180vm_call_iseq_setup_normal_0start_1params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20181{
20182 ((void)0);
20183 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 1, 1);
20184}
20185static VALUE
20186vm_call_iseq_setup_normal_0start_1params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20187{
20188 ((void)0);
20189 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 1, 2);
20190}
20191static VALUE
20192vm_call_iseq_setup_normal_0start_1params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20193{
20194 ((void)0);
20195 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 1, 3);
20196}
20197static VALUE
20198vm_call_iseq_setup_normal_0start_1params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20199{
20200 ((void)0);
20201 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 1, 4);
20202}
20203static VALUE
20204vm_call_iseq_setup_normal_0start_1params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20205{
20206 ((void)0);
20207 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 1, 5);
20208}
20209static VALUE
20210vm_call_iseq_setup_normal_0start_2params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20211{
20212 ((void)0);
20213 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 2, 0);
20214}
20215static VALUE
20216vm_call_iseq_setup_normal_0start_2params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20217{
20218 ((void)0);
20219 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 2, 1);
20220}
20221static VALUE
20222vm_call_iseq_setup_normal_0start_2params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20223{
20224 ((void)0);
20225 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 2, 2);
20226}
20227static VALUE
20228vm_call_iseq_setup_normal_0start_2params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20229{
20230 ((void)0);
20231 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 2, 3);
20232}
20233static VALUE
20234vm_call_iseq_setup_normal_0start_2params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20235{
20236 ((void)0);
20237 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 2, 4);
20238}
20239static VALUE
20240vm_call_iseq_setup_normal_0start_2params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20241{
20242 ((void)0);
20243 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 2, 5);
20244}
20245static VALUE
20246vm_call_iseq_setup_normal_0start_3params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20247{
20248 ((void)0);
20249 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 3, 0);
20250}
20251static VALUE
20252vm_call_iseq_setup_normal_0start_3params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20253{
20254 ((void)0);
20255 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 3, 1);
20256}
20257static VALUE
20258vm_call_iseq_setup_normal_0start_3params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20259{
20260 ((void)0);
20261 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 3, 2);
20262}
20263static VALUE
20264vm_call_iseq_setup_normal_0start_3params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20265{
20266 ((void)0);
20267 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 3, 3);
20268}
20269static VALUE
20270vm_call_iseq_setup_normal_0start_3params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20271{
20272 ((void)0);
20273 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 3, 4);
20274}
20275static VALUE
20276vm_call_iseq_setup_normal_0start_3params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
20277{
20278 ((void)0);
20279 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, 3, 5);
20280}
20281static const vm_call_handler vm_call_iseq_handlers[][6] = {
20282 {
20283 vm_call_iseq_setup_normal_0start_0params_0locals,
20284 vm_call_iseq_setup_normal_0start_0params_1locals,
20285 vm_call_iseq_setup_normal_0start_0params_2locals,
20286 vm_call_iseq_setup_normal_0start_0params_3locals,
20287 vm_call_iseq_setup_normal_0start_0params_4locals,
20288 vm_call_iseq_setup_normal_0start_0params_5locals,
20289 },
20290 {
20291 vm_call_iseq_setup_normal_0start_1params_0locals,
20292 vm_call_iseq_setup_normal_0start_1params_1locals,
20293 vm_call_iseq_setup_normal_0start_1params_2locals,
20294 vm_call_iseq_setup_normal_0start_1params_3locals,
20295 vm_call_iseq_setup_normal_0start_1params_4locals,
20296 vm_call_iseq_setup_normal_0start_1params_5locals,
20297 },
20298 {
20299 vm_call_iseq_setup_normal_0start_2params_0locals,
20300 vm_call_iseq_setup_normal_0start_2params_1locals,
20301 vm_call_iseq_setup_normal_0start_2params_2locals,
20302 vm_call_iseq_setup_normal_0start_2params_3locals,
20303 vm_call_iseq_setup_normal_0start_2params_4locals,
20304 vm_call_iseq_setup_normal_0start_2params_5locals,
20305 },
20306 {
20307 vm_call_iseq_setup_normal_0start_3params_0locals,
20308 vm_call_iseq_setup_normal_0start_3params_1locals,
20309 vm_call_iseq_setup_normal_0start_3params_2locals,
20310 vm_call_iseq_setup_normal_0start_3params_3locals,
20311 vm_call_iseq_setup_normal_0start_3params_4locals,
20312 vm_call_iseq_setup_normal_0start_3params_5locals,
20313 },
20314};
20315static inline vm_call_handler
20316vm_call_iseq_setup_func(const struct rb_callinfo *ci, const int param_size, const int local_size)
20317{
20318 if ((__builtin_expect(!!(vm_ci_flag(ci) & (0x01 << VM_CALL_TAILCALL_bit)), 0))) {
20319 return &vm_call_iseq_setup_tailcall_0start;
20320 }
20321 else if (0) {
20322 return &vm_call_iseq_setup_normal_0start;
20323 }
20324 else if (param_size <= 3 && local_size <= 5) {
20325 ((void)0);
20326 return vm_call_iseq_handlers[param_size][local_size];
20327 }
20328 else {
20329 return &vm_call_iseq_setup_normal_0start;
20330 }
20331}
20332#define MJIT_HEADER 1
20333#define _FORTIFY_SOURCE 2
20334#define RUBY_DEVEL 1
20335#define RUBY_EXPORT 1
20336#define _STDC_PREDEF_H 1
20337#define __STDC_IEC_559__ 1
20338#define __STDC_IEC_60559_BFP__ 201404L
20339#define __STDC_IEC_559_COMPLEX__ 1
20340#define __STDC_IEC_60559_COMPLEX__ 201404L
20341#define __STDC_ISO_10646__ 201706L
20342#define vm_exec rb_vm_exec
20343#define RUBY_EVAL_INTERN_H
20344#define RUBY_RUBY_H 1
20345#define RBIMPL_CONFIG_H
20346#define INCLUDE_RUBY_CONFIG_H 1
20347#define HAVE_STDIO_H 1
20348#define HAVE_STDLIB_H 1
20349#define HAVE_STRING_H 1
20350#define HAVE_INTTYPES_H 1
20351#define HAVE_STDINT_H 1
20352#define HAVE_STRINGS_H 1
20353#define HAVE_SYS_STAT_H 1
20354#define HAVE_SYS_TYPES_H 1
20355#define HAVE_UNISTD_H 1
20356#define HAVE_WCHAR_H 1
20357#define STDC_HEADERS 1
20358#define _ALL_SOURCE 1
20359#define _DARWIN_C_SOURCE 1
20360#define _GNU_SOURCE 1
20361#define _HPUX_ALT_XOPEN_SOCKET_API 1
20362#define _NETBSD_SOURCE 1
20363#define _OPENBSD_SOURCE 1
20364#define _POSIX_PTHREAD_SEMANTICS 1
20365#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
20366#define __STDC_WANT_IEC_60559_BFP_EXT__ 1
20367#define __STDC_WANT_IEC_60559_DFP_EXT__ 1
20368#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
20369#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
20370#define __STDC_WANT_LIB_EXT2__ 1
20371#define __STDC_WANT_MATH_SPEC_FUNCS__ 1
20372#define _TANDEM_SOURCE 1
20373#define __EXTENSIONS__ 1
20374#define RUBY_SYMBOL_EXPORT_BEGIN _Pragma("GCC visibility push(default)")
20375#define RUBY_SYMBOL_EXPORT_END _Pragma("GCC visibility pop")
20376#define HAVE_STMT_AND_DECL_IN_EXPR 1
20377#define HAVE_PTHREAD_H 1
20378#define _REENTRANT 1
20379#define _THREAD_SAFE 1
20380#define HAVE_LIBPTHREAD 1
20381#define THREAD_IMPL_H "thread_pthread.h"
20382#define THREAD_IMPL_SRC "thread_pthread.c"
20383#define HAVE_LIBCRYPT 1
20384#define HAVE_LIBDL 1
20385#define HAVE_DIRENT_H 1
20386#define HAVE__BOOL 1
20387#define HAVE_STDBOOL_H 1
20388#define HAVE_SYS_WAIT_H 1
20389#define HAVE_GRP_H 1
20390#define HAVE_FCNTL_H 1
20391#define HAVE_FLOAT_H 1
20392#define HAVE_LANGINFO_H 1
20393#define HAVE_LIMITS_H 1
20394#define HAVE_LOCALE_H 1
20395#define HAVE_MALLOC_H 1
20396#define HAVE_PWD_H 1
20397#define HAVE_SANITIZER_ASAN_INTERFACE_H 1
20398#define HAVE_STDALIGN_H 1
20399#define HAVE_STDIO_H 1
20400#define HAVE_SYS_EVENTFD_H 1
20401#define HAVE_SYS_FCNTL_H 1
20402#define HAVE_SYS_FILE_H 1
20403#define HAVE_SYS_IOCTL_H 1
20404#define HAVE_SYS_PARAM_H 1
20405#define HAVE_SYS_PRCTL_H 1
20406#define HAVE_SYS_RANDOM_H 1
20407#define HAVE_SYS_RESOURCE_H 1
20408#define HAVE_SYS_SELECT_H 1
20409#define HAVE_SYS_SENDFILE_H 1
20410#define HAVE_SYS_SOCKET_H 1
20411#define HAVE_SYS_SYSCALL_H 1
20412#define HAVE_SYS_SYSMACROS_H 1
20413#define HAVE_SYS_TIME_H 1
20414#define HAVE_SYS_TIMES_H 1
20415#define HAVE_SYS_UIO_H 1
20416#define HAVE_SYSCALL_H 1
20417#define HAVE_TIME_H 1
20418#define HAVE_UCONTEXT_H 1
20419#define HAVE_UTIME_H 1
20420#define HAVE_X86INTRIN_H 1
20421#define HAVE_X86INTRIN_H 1
20422#define HAVE_GMP_H 1
20423#define HAVE_LIBGMP 1
20424#define HAVE_TYPEOF 1
20425#define restrict __restrict__
20426#define HAVE_LONG_LONG 1
20427#define HAVE_OFF_T 1
20428#define SIZEOF_INT 4
20429#define SIZEOF_SHORT 2
20430#define SIZEOF_LONG 8
20431#define SIZEOF_LONG_LONG 8
20432#define SIZEOF___INT64 0
20433#define SIZEOF___INT128 16
20434#define SIZEOF_OFF_T 8
20435#define SIZEOF_VOIDP 8
20436#define SIZEOF_FLOAT 4
20437#define SIZEOF_DOUBLE 8
20438#define SIZEOF_TIME_T 8
20439#define SIZEOF_CLOCK_T 8
20440#define PACKED_STRUCT(x) x __attribute__((packed))
20441#define USE_UNALIGNED_MEMBER_ACCESS 1
20442#define PRI_LL_PREFIX "ll"
20443#define HAVE_PID_T 1
20444#define rb_pid_t pid_t
20445#define SIGNEDNESS_OF_PID_T -1
20446#define PIDT2NUM(v) INT2NUM(v)
20447#define NUM2PIDT(v) NUM2INT(v)
20448#define PRI_PIDT_PREFIX PRI_INT_PREFIX
20449#define HAVE_UID_T 1
20450#define rb_uid_t uid_t
20451#define SIGNEDNESS_OF_UID_T +1
20452#define UIDT2NUM(v) UINT2NUM(v)
20453#define NUM2UIDT(v) NUM2UINT(v)
20454#define PRI_UIDT_PREFIX PRI_INT_PREFIX
20455#define HAVE_GID_T 1
20456#define rb_gid_t gid_t
20457#define SIGNEDNESS_OF_GID_T +1
20458#define GIDT2NUM(v) UINT2NUM(v)
20459#define NUM2GIDT(v) NUM2UINT(v)
20460#define PRI_GIDT_PREFIX PRI_INT_PREFIX
20461#define HAVE_TIME_T 1
20462#define rb_time_t time_t
20463#define SIGNEDNESS_OF_TIME_T -1
20464#define TIMET2NUM(v) LONG2NUM(v)
20465#define NUM2TIMET(v) NUM2LONG(v)
20466#define PRI_TIMET_PREFIX PRI_LONG_PREFIX
20467#define HAVE_DEV_T 1
20468#define rb_dev_t dev_t
20469#define SIGNEDNESS_OF_DEV_T +1
20470#define DEVT2NUM(v) ULONG2NUM(v)
20471#define NUM2DEVT(v) NUM2ULONG(v)
20472#define PRI_DEVT_PREFIX PRI_LONG_PREFIX
20473#define HAVE_MODE_T 1
20474#define rb_mode_t mode_t
20475#define SIGNEDNESS_OF_MODE_T +1
20476#define MODET2NUM(v) UINT2NUM(v)
20477#define NUM2MODET(v) NUM2UINT(v)
20478#define PRI_MODET_PREFIX PRI_INT_PREFIX
20479#define HAVE_RLIM_T 1
20480#define rb_rlim_t rlim_t
20481#define SIGNEDNESS_OF_RLIM_T +1
20482#define RLIM2NUM(v) ULONG2NUM(v)
20483#define NUM2RLIM(v) NUM2ULONG(v)
20484#define PRI_RLIM_PREFIX PRI_LONG_PREFIX
20485#define HAVE_OFF_T 1
20486#define rb_off_t off_t
20487#define SIGNEDNESS_OF_OFF_T -1
20488#define OFFT2NUM(v) LONG2NUM(v)
20489#define NUM2OFFT(v) NUM2LONG(v)
20490#define PRI_OFFT_PREFIX PRI_LONG_PREFIX
20491#define HAVE_CLOCKID_T 1
20492#define rb_clockid_t clockid_t
20493#define SIGNEDNESS_OF_CLOCKID_T -1
20494#define CLOCKID2NUM(v) INT2NUM(v)
20495#define NUM2CLOCKID(v) NUM2INT(v)
20496#define PRI_CLOCKID_PREFIX PRI_INT_PREFIX
20497#define HAVE_VA_ARGS_MACRO 1
20498#define HAVE__ALIGNOF 1
20499#define CONSTFUNC(x) __attribute__ ((__const__)) x
20500#define PUREFUNC(x) __attribute__ ((__pure__)) x
20501#define NORETURN(x) __attribute__ ((__noreturn__)) x
20502#define DEPRECATED(x) __attribute__ ((__deprecated__)) x
20503#define DEPRECATED_BY(n,x) __attribute__ ((__deprecated__("by "#n))) x
20504#define NOINLINE(x) __attribute__ ((__noinline__)) x
20505#define NO_SANITIZE(san,x) __attribute__ ((__no_sanitize__(san))) x
20506#define NO_SANITIZE_ADDRESS(x) __attribute__ ((__no_sanitize_address__)) x
20507#define NO_ADDRESS_SAFETY_ANALYSIS(x) __attribute__ ((__no_address_safety_analysis__)) x
20508#define WARN_UNUSED_RESULT(x) __attribute__ ((__warn_unused_result__)) x
20509#define MAYBE_UNUSED(x) __attribute__ ((__unused__)) x
20510#define ERRORFUNC(mesg,x) __attribute__ ((__error__ mesg)) x
20511#define WARNINGFUNC(mesg,x) __attribute__ ((__warning__ mesg)) x
20512#define WEAK(x) __attribute__ ((__weak__)) x
20513#define HAVE_FUNC_WEAK 1
20514#define RUBY_CXX_DEPRECATED(msg) __attribute__((__deprecated__(msg)))
20515#define HAVE_NULLPTR 1
20516#define FUNC_UNOPTIMIZED(x) __attribute__ ((__optimize__("O0"))) x
20517#define FUNC_MINIMIZED(x) __attribute__ ((__optimize__("-Os","-fomit-frame-pointer"))) x
20518#define HAVE_ATTRIBUTE_FUNCTION_ALIAS 1
20519#define RUBY_ALIAS_FUNCTION_TYPE(type,prot,name,args) type prot __attribute__((alias(#name)));
20520#define RUBY_ALIAS_FUNCTION_VOID(prot,name,args) RUBY_ALIAS_FUNCTION_TYPE(void, prot, name, args)
20521#define HAVE_GCC_ATOMIC_BUILTINS 1
20522#define HAVE_GCC_SYNC_BUILTINS 1
20523#define HAVE___BUILTIN_UNREACHABLE 1
20524#define RUBY_FUNC_EXPORTED __attribute__ ((__visibility__("default"))) extern
20525#define RUBY_FUNC_NONNULL(n,x) __attribute__ ((__nonnull__(n))) x
20526#define RUBY_FUNCTION_NAME_STRING __func__
20527#define ENUM_OVER_INT 1
20528#define HAVE_DECL_SYS_NERR 0
20529#define HAVE_DECL_GETENV 1
20530#define SIZEOF_SIZE_T 8
20531#define SIZEOF_PTRDIFF_T 8
20532#define SIZEOF_DEV_T 8
20533#define PRI_SIZE_PREFIX "z"
20534#define PRI_PTRDIFF_PREFIX "t"
20535#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20536#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20537#define HAVE_STRUCT_STAT_ST_RDEV 1
20538#define SIZEOF_STRUCT_STAT_ST_SIZE SIZEOF_OFF_T
20539#define SIZEOF_STRUCT_STAT_ST_BLOCKS SIZEOF_OFF_T
20540#define SIZEOF_STRUCT_STAT_ST_INO SIZEOF_LONG
20541#define SIZEOF_STRUCT_STAT_ST_DEV SIZEOF_DEV_T
20542#define SIZEOF_STRUCT_STAT_ST_RDEV SIZEOF_DEV_T
20543#define HAVE_STRUCT_STAT_ST_ATIM 1
20544#define HAVE_STRUCT_STAT_ST_MTIM 1
20545#define HAVE_STRUCT_STAT_ST_CTIM 1
20546#define HAVE_STRUCT_STATX_STX_BTIME 1
20547#define HAVE_STRUCT_TIMEVAL 1
20548#define SIZEOF_STRUCT_TIMEVAL_TV_SEC SIZEOF_TIME_T
20549#define HAVE_STRUCT_TIMESPEC 1
20550#define HAVE_STRUCT_TIMEZONE 1
20551#define HAVE_RB_FD_INIT 1
20552#define HAVE_INT8_T 1
20553#define SIZEOF_INT8_T 1
20554#define HAVE_UINT8_T 1
20555#define SIZEOF_UINT8_T 1
20556#define HAVE_INT16_T 1
20557#define SIZEOF_INT16_T 2
20558#define HAVE_UINT16_T 1
20559#define SIZEOF_UINT16_T 2
20560#define HAVE_INT32_T 1
20561#define SIZEOF_INT32_T 4
20562#define HAVE_UINT32_T 1
20563#define SIZEOF_UINT32_T 4
20564#define HAVE_INT64_T 1
20565#define SIZEOF_INT64_T 8
20566#define HAVE_UINT64_T 1
20567#define SIZEOF_UINT64_T 8
20568#define HAVE_INT128_T 1
20569#define int128_t __int128
20570#define SIZEOF_INT128_T SIZEOF___INT128
20571#define HAVE_UINT128_T 1
20572#define uint128_t unsigned __int128
20573#define SIZEOF_UINT128_T SIZEOF___INT128
20574#define HAVE_INTPTR_T 1
20575#define SIZEOF_INTPTR_T 8
20576#define HAVE_UINTPTR_T 1
20577#define SIZEOF_UINTPTR_T 8
20578#define HAVE_SSIZE_T 1
20579#define SIZEOF_SSIZE_T 8
20580#define STACK_END_ADDRESS __libc_stack_end
20581#define GETGROUPS_T gid_t
20582#define HAVE_ALLOCA_H 1
20583#define HAVE_ALLOCA 1
20584#define HAVE_DUP 1
20585#define HAVE_DUP2 1
20586#define HAVE_ACOSH 1
20587#define HAVE_CBRT 1
20588#define HAVE_CRYPT 1
20589#define HAVE_ERF 1
20590#define HAVE_EXPLICIT_BZERO 1
20591#define HAVE_FFS 1
20592#define HAVE_FLOCK 1
20593#define HAVE_HYPOT 1
20594#define HAVE_LGAMMA_R 1
20595#define HAVE_MEMMOVE 1
20596#define HAVE_NAN 1
20597#define HAVE_NEXTAFTER 1
20598#define HAVE_STRCHR 1
20599#define HAVE_STRERROR 1
20600#define HAVE_STRSTR 1
20601#define HAVE_TGAMMA 1
20602#define HAVE_ISFINITE 1
20603#define SPT_TYPE SPT_REUSEARGV
20604#define HAVE_SIGNBIT 1
20605#define HAVE_FORK 1
20606#define HAVE_VFORK 1
20607#define HAVE_WORKING_VFORK 1
20608#define HAVE_WORKING_FORK 1
20609#define HAVE__LONGJMP 1
20610#define HAVE_ATAN2L 1
20611#define HAVE_ATAN2F 1
20612#define HAVE_CHMOD 1
20613#define HAVE_CHOWN 1
20614#define HAVE_CHROOT 1
20615#define HAVE_CLOCK_GETTIME 1
20616#define HAVE_COPY_FILE_RANGE 1
20617#define HAVE_COSH 1
20618#define HAVE_CRYPT_R 1
20619#define HAVE_DIRFD 1
20620#define HAVE_DL_ITERATE_PHDR 1
20621#define HAVE_DLOPEN 1
20622#define HAVE_DLADDR 1
20623#define HAVE_DUP3 1
20624#define HAVE_EACCESS 1
20625#define HAVE_ENDGRENT 1
20626#define HAVE_EVENTFD 1
20627#define HAVE_EXECL 1
20628#define HAVE_EXECLE 1
20629#define HAVE_EXECV 1
20630#define HAVE_EXECVE 1
20631#define HAVE_FCHMOD 1
20632#define HAVE_FCHOWN 1
20633#define HAVE_FCNTL 1
20634#define HAVE_FDATASYNC 1
20635#define HAVE_FDOPENDIR 1
20636#define HAVE_FMOD 1
20637#define HAVE_FSTATAT 1
20638#define HAVE_FSYNC 1
20639#define HAVE_FTRUNCATE 1
20640#define HAVE_FTRUNCATE64 1
20641#define HAVE_GETCWD 1
20642#define HAVE_GETEGID 1
20643#define HAVE_GETENTROPY 1
20644#define HAVE_GETEUID 1
20645#define HAVE_GETGID 1
20646#define HAVE_GETGRNAM 1
20647#define HAVE_GETGRNAM_R 1
20648#define HAVE_GETGROUPS 1
20649#define HAVE_GETLOGIN 1
20650#define HAVE_GETLOGIN_R 1
20651#define HAVE_GETPGID 1
20652#define HAVE_GETPGRP 1
20653#define HAVE_GETPPID 1
20654#define HAVE_GETPRIORITY 1
20655#define HAVE_GETPWNAM 1
20656#define HAVE_GETPWNAM_R 1
20657#define HAVE_GETPWUID 1
20658#define HAVE_GETPWUID_R 1
20659#define HAVE_GETRANDOM 1
20660#define HAVE_GETRESGID 1
20661#define HAVE_GETRESUID 1
20662#define HAVE_GETRLIMIT 1
20663#define HAVE_GETSID 1
20664#define HAVE_GETTIMEOFDAY 1
20665#define HAVE_GETUID 1
20666#define HAVE_GMTIME_R 1
20667#define HAVE_GRANTPT 1
20668#define HAVE_INITGROUPS 1
20669#define HAVE_IOCTL 1
20670#define HAVE_KILL 1
20671#define HAVE_KILLPG 1
20672#define HAVE_LCHMOD 1
20673#define HAVE_LCHOWN 1
20674#define HAVE_LINK 1
20675#define HAVE_LLABS 1
20676#define HAVE_LOCKF 1
20677#define HAVE_LOG2 1
20678#define HAVE_LSTAT 1
20679#define HAVE_LUTIMES 1
20680#define HAVE_MALLOC_USABLE_SIZE 1
20681#define HAVE_MBLEN 1
20682#define HAVE_MEMALIGN 1
20683#define HAVE_WRITEV 1
20684#define HAVE_MEMRCHR 1
20685#define HAVE_MEMMEM 1
20686#define HAVE_MKFIFO 1
20687#define HAVE_MKNOD 1
20688#define HAVE_MKTIME 1
20689#define HAVE_MMAP 1
20690#define HAVE_MREMAP 1
20691#define HAVE_OPENAT 1
20692#define HAVE_PCLOSE 1
20693#define HAVE_PIPE 1
20694#define HAVE_PIPE2 1
20695#define HAVE_POLL 1
20696#define HAVE_POPEN 1
20697#define HAVE_POSIX_FADVISE 1
20698#define HAVE_POSIX_MADVISE 1
20699#define HAVE_POSIX_MEMALIGN 1
20700#define HAVE_PPOLL 1
20701#define HAVE_PREAD 1
20702#define HAVE_PWRITE 1
20703#define HAVE_QSORT_R 1
20704#define HAVE_READLINK 1
20705#define HAVE_REALPATH 1
20706#define HAVE_ROUND 1
20707#define HAVE_SCHED_GETAFFINITY 1
20708#define HAVE_SEEKDIR 1
20709#define HAVE_SENDFILE 1
20710#define HAVE_SETEGID 1
20711#define HAVE_SETENV 1
20712#define HAVE_SETEUID 1
20713#define HAVE_SETGID 1
20714#define HAVE_SETGROUPS 1
20715#define HAVE_SETPGID 1
20716#define HAVE_SETPGRP 1
20717#define HAVE_SETREGID 1
20718#define HAVE_SETRESGID 1
20719#define HAVE_SETRESUID 1
20720#define HAVE_SETREUID 1
20721#define HAVE_SETRLIMIT 1
20722#define HAVE_SETSID 1
20723#define HAVE_SETUID 1
20724#define HAVE_SHUTDOWN 1
20725#define HAVE_SIGACTION 1
20726#define HAVE_SIGALTSTACK 1
20727#define HAVE_SIGPROCMASK 1
20728#define HAVE_SINH 1
20729#define HAVE_SYMLINK 1
20730#define HAVE_SYSCALL 1
20731#define HAVE_SYSCONF 1
20732#define HAVE_SYSTEM 1
20733#define HAVE_TANH 1
20734#define HAVE_TELLDIR 1
20735#define HAVE_TIMEGM 1
20736#define HAVE_TIMES 1
20737#define HAVE_TRUNCATE 1
20738#define HAVE_TRUNCATE64 1
20739#define HAVE_TZSET 1
20740#define HAVE_UMASK 1
20741#define HAVE_UNSETENV 1
20742#define HAVE_UTIMENSAT 1
20743#define HAVE_UTIMES 1
20744#define HAVE_WAIT4 1
20745#define HAVE_WAITPID 1
20746#define HAVE_STATX 1
20747#define HAVE_CRYPT_H 1
20748#define HAVE_STRUCT_CRYPT_DATA_INITIALIZED 1
20749#define HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN 1
20750#define HAVE_BUILTIN___BUILTIN_ASSUME_ALIGNED 1
20751#define HAVE_BUILTIN___BUILTIN_BSWAP16 1
20752#define HAVE_BUILTIN___BUILTIN_BSWAP32 1
20753#define HAVE_BUILTIN___BUILTIN_BSWAP64 1
20754#define HAVE_BUILTIN___BUILTIN_POPCOUNT 1
20755#define HAVE_BUILTIN___BUILTIN_POPCOUNTLL 1
20756#define HAVE_BUILTIN___BUILTIN_CLZ 1
20757#define HAVE_BUILTIN___BUILTIN_CLZL 1
20758#define HAVE_BUILTIN___BUILTIN_CLZLL 1
20759#define HAVE_BUILTIN___BUILTIN_CTZ 1
20760#define HAVE_BUILTIN___BUILTIN_CTZLL 1
20761#define HAVE_BUILTIN___BUILTIN_ADD_OVERFLOW 1
20762#define HAVE_BUILTIN___BUILTIN_SUB_OVERFLOW 1
20763#define HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW 1
20764#define HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW_P 1
20765#define HAVE_BUILTIN___BUILTIN_CONSTANT_P 1
20766#define HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR 1
20767#define HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P 1
20768#define HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P 1
20769#define HAVE_BUILTIN___BUILTIN_TRAP 1
20770#define HAVE_BUILTIN___BUILTIN_EXPECT 1
20771#define HAVE_GNU_QSORT_R 1
20772#define ATAN2_INF_C99 1
20773#define HAVE_CLOCK_GETRES 1
20774#define HAVE_LIBRT 1
20775#define HAVE_LIBRT 1
20776#define HAVE_TIMER_CREATE 1
20777#define HAVE_TIMER_SETTIME 1
20778#define HAVE_STRUCT_TM_TM_ZONE 1
20779#define HAVE_TM_ZONE 1
20780#define HAVE_STRUCT_TM_TM_GMTOFF 1
20781#define HAVE_DAYLIGHT 1
20782#define NEGATIVE_TIME_T 1
20783#define POSIX_SIGNAL 1
20784#define HAVE_SIG_T 1
20785#define RSHIFT(x,y) ((x)>>(int)(y))
20786#define USE_COPY_FILE_RANGE 1
20787#define HAVE__SC_CLK_TCK 1
20788#define STACK_GROW_DIRECTION -1
20789#define COROUTINE_H "coroutine/amd64/Context.h"
20790#define HAVE_SCHED_YIELD 1
20791#define HAVE_PTHREAD_ATTR_SETINHERITSCHED 1
20792#define HAVE_PTHREAD_ATTR_GETSTACK 1
20793#define HAVE_PTHREAD_ATTR_GETGUARDSIZE 1
20794#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
20795#define HAVE_PTHREAD_SETNAME_NP 1
20796#define HAVE_PTHREAD_SIGMASK 1
20797#define HAVE_PTHREAD_GETATTR_NP 1
20798#define SET_CURRENT_THREAD_NAME(name) pthread_setname_np(pthread_self(), name)
20799#define SET_ANOTHER_THREAD_NAME(thid,name) pthread_setname_np(thid, name)
20800#define DEFINE_MCONTEXT_PTR(mc,uc) mcontext_t *mc = &(uc)->uc_mcontext
20801#define HAVE_GETCONTEXT 1
20802#define HAVE_SETCONTEXT 1
20803#define HAVE_SYS_USER_H 1
20804#define HAVE_CONST_PAGE_SIZE 1
20805#define IOCTL_REQ_TYPE unsigned long
20806#define NUM2IOCTLREQ(num) NUM2ULONG(num)
20807#define USE_ELF 1
20808#define HAVE_ELF_H 1
20809#define HAVE_LIBZ 1
20810#define HAVE_BACKTRACE 1
20811#define HAVE_VALGRIND_MEMCHECK_H 1
20812#define DLEXT_MAXLEN 3
20813#define DLEXT ".so"
20814#define HAVE__SETJMP 1
20815#define RUBY_SETJMP(env) __builtin_setjmp((env))
20816#define RUBY_LONGJMP(env,val) __builtin_longjmp((env),val)
20817#define USE_MJIT 1
20818#define USE_YJIT 0
20819#define RUBY_PLATFORM "x86_64-linux"
20820#define RBIMPL_COMPILER_SINCE_H
20821#define RBIMPL_COMPILER_IS_H
20822#define RBIMPL_COMPILER_IS(cc) RBIMPL_COMPILER_IS_ ## cc
20823#define RBIMPL_COMPILER_IS_APPLE_H
20824#define RBIMPL_COMPILER_IS_Apple 0
20825#define RBIMPL_COMPILER_IS_CLANG_H
20826#define RBIMPL_COMPILER_IS_Clang 0
20827#define RBIMPL_COMPILER_IS_GCC_H
20828#define RBIMPL_COMPILER_IS_INTEL_H
20829#define RBIMPL_COMPILER_IS_Intel 0
20830#define RBIMPL_COMPILER_IS_GCC 1
20831#define RBIMPL_COMPILER_VERSION_MAJOR __GNUC__
20832#define RBIMPL_COMPILER_VERSION_MINOR __GNUC_MINOR__
20833#define RBIMPL_COMPILER_VERSION_PATCH __GNUC_PATCHLEVEL__
20834#define RBIMPL_COMPILER_IS_MSVC_H
20835#define RBIMPL_COMPILER_IS_MSVC 0
20836#define RBIMPL_COMPILER_IS_SUNPRO_H
20837#define RBIMPL_COMPILER_IS_SunPro 0
20838#define RBIMPL_COMPILER_SINCE(cc,x,y,z) (RBIMPL_COMPILER_IS(cc) && ((RBIMPL_COMPILER_VERSION_MAJOR > (x)) || ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && ((RBIMPL_COMPILER_VERSION_MINOR > (y)) || ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && (RBIMPL_COMPILER_VERSION_PATCH >= (z)))))))
20839#define RBIMPL_COMPILER_BEFORE(cc,x,y,z) (RBIMPL_COMPILER_IS(cc) && ((RBIMPL_COMPILER_VERSION_MAJOR < (x)) || ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && ((RBIMPL_COMPILER_VERSION_MINOR < (y)) || ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && (RBIMPL_COMPILER_VERSION_PATCH < (z)))))))
20840#undef HAVE_PROTOTYPES
20841#define HAVE_PROTOTYPES 1
20842#undef HAVE_STDARG_PROTOTYPES
20843#define HAVE_STDARG_PROTOTYPES 1
20844#undef TOKEN_PASTE
20845#define TOKEN_PASTE(x,y) x ##y
20846#define STRINGIZE(expr) STRINGIZE0(expr)
20847#define STRINGIZE0(expr) #expr
20848#define UNALIGNED_WORD_ACCESS 1
20849#define RBIMPL_TEST3(q,w,e,...) e
20850#define RBIMPL_TEST2(...) RBIMPL_TEST3(__VA_OPT__(,),1,0,0)
20851#define RBIMPL_TEST1() RBIMPL_TEST2("ruby")
20852#define HAVE___VA_OPT__
20853#undef RBIMPL_TEST1
20854#undef RBIMPL_TEST2
20855#undef RBIMPL_TEST3
20856#define USE_RVARGC 1
20857#define _STDARG_H
20858#define _ANSI_STDARG_H_
20859#undef __need___va_list
20860#define __GNUC_VA_LIST
20861#define va_start(v,l) __builtin_va_start(v,l)
20862#define va_end(v) __builtin_va_end(v)
20863#define va_arg(v,l) __builtin_va_arg(v,l)
20864#define va_copy(d,s) __builtin_va_copy(d,s)
20865#define __va_copy(d,s) __builtin_va_copy(d,s)
20866#define _VA_LIST_
20867#define _VA_LIST
20868#define _VA_LIST_DEFINED
20869#define _VA_LIST_T_H
20870#define __va_list__
20871#define RUBY_DEFINES_H 1
20872#define _STDIO_H 1
20873#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
20874#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
20875#define _FEATURES_H 1
20876#undef __USE_ISOC11
20877#undef __USE_ISOC99
20878#undef __USE_ISOC95
20879#undef __USE_ISOCXX11
20880#undef __USE_POSIX
20881#undef __USE_POSIX2
20882#undef __USE_POSIX199309
20883#undef __USE_POSIX199506
20884#undef __USE_XOPEN
20885#undef __USE_XOPEN_EXTENDED
20886#undef __USE_UNIX98
20887#undef __USE_XOPEN2K
20888#undef __USE_XOPEN2KXSI
20889#undef __USE_XOPEN2K8
20890#undef __USE_XOPEN2K8XSI
20891#undef __USE_LARGEFILE
20892#undef __USE_LARGEFILE64
20893#undef __USE_FILE_OFFSET64
20894#undef __USE_MISC
20895#undef __USE_ATFILE
20896#undef __USE_DYNAMIC_STACK_SIZE
20897#undef __USE_GNU
20898#undef __USE_FORTIFY_LEVEL
20899#undef __KERNEL_STRICT_NAMES
20900#undef __GLIBC_USE_ISOC2X
20901#undef __GLIBC_USE_DEPRECATED_GETS
20902#undef __GLIBC_USE_DEPRECATED_SCANF
20903#define __KERNEL_STRICT_NAMES
20904#define __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
20905#define __glibc_clang_prereq(maj,min) 0
20906#define __GLIBC_USE(F) __GLIBC_USE_ ## F
20907#undef _ISOC95_SOURCE
20908#define _ISOC95_SOURCE 1
20909#undef _ISOC99_SOURCE
20910#define _ISOC99_SOURCE 1
20911#undef _ISOC11_SOURCE
20912#define _ISOC11_SOURCE 1
20913#undef _ISOC2X_SOURCE
20914#define _ISOC2X_SOURCE 1
20915#undef _POSIX_SOURCE
20916#define _POSIX_SOURCE 1
20917#undef _POSIX_C_SOURCE
20918#define _POSIX_C_SOURCE 200809L
20919#undef _XOPEN_SOURCE
20920#define _XOPEN_SOURCE 700
20921#undef _XOPEN_SOURCE_EXTENDED
20922#define _XOPEN_SOURCE_EXTENDED 1
20923#undef _LARGEFILE64_SOURCE
20924#define _LARGEFILE64_SOURCE 1
20925#undef _DEFAULT_SOURCE
20926#define _DEFAULT_SOURCE 1
20927#undef _ATFILE_SOURCE
20928#define _ATFILE_SOURCE 1
20929#undef _DYNAMIC_STACK_SIZE_SOURCE
20930#define _DYNAMIC_STACK_SIZE_SOURCE 1
20931#undef _DEFAULT_SOURCE
20932#define _DEFAULT_SOURCE 1
20933#define __GLIBC_USE_ISOC2X 1
20934#define __USE_ISOC11 1
20935#define __USE_ISOC99 1
20936#define __USE_ISOC95 1
20937#undef _POSIX_SOURCE
20938#define _POSIX_SOURCE 1
20939#undef _POSIX_C_SOURCE
20940#define _POSIX_C_SOURCE 200809L
20941#define __USE_POSIX 1
20942#define __USE_POSIX2 1
20943#define __USE_POSIX199309 1
20944#define __USE_POSIX199506 1
20945#define __USE_XOPEN2K 1
20946#undef __USE_ISOC95
20947#define __USE_ISOC95 1
20948#undef __USE_ISOC99
20949#define __USE_ISOC99 1
20950#define __USE_XOPEN2K8 1
20951#undef _ATFILE_SOURCE
20952#define _ATFILE_SOURCE 1
20953#define __USE_XOPEN 1
20954#define __USE_XOPEN_EXTENDED 1
20955#define __USE_UNIX98 1
20956#undef _LARGEFILE_SOURCE
20957#define _LARGEFILE_SOURCE 1
20958#define __USE_XOPEN2K8 1
20959#define __USE_XOPEN2K8XSI 1
20960#define __USE_XOPEN2K 1
20961#define __USE_XOPEN2KXSI 1
20962#undef __USE_ISOC95
20963#define __USE_ISOC95 1
20964#undef __USE_ISOC99
20965#define __USE_ISOC99 1
20966#define __USE_LARGEFILE 1
20967#define __USE_LARGEFILE64 1
20968#define __WORDSIZE 64
20969#define __WORDSIZE_TIME64_COMPAT32 1
20970#define __SYSCALL_WORDSIZE 64
20971#define __WORDSIZE 64
20972#define __WORDSIZE_TIME64_COMPAT32 1
20973#define __SYSCALL_WORDSIZE 64
20974#define __TIMESIZE __WORDSIZE
20975#define __USE_MISC 1
20976#define __USE_ATFILE 1
20977#define __USE_DYNAMIC_STACK_SIZE 1
20978#define __USE_GNU 1
20979#define __USE_FORTIFY_LEVEL 2
20980#define __GLIBC_USE_DEPRECATED_GETS 0
20981#define __GLIBC_USE_DEPRECATED_SCANF 0
20982#undef __GNU_LIBRARY__
20983#define __GNU_LIBRARY__ 6
20984#define __GLIBC__ 2
20985#define __GLIBC_MINOR__ 35
20986#define __GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
20987#define _SYS_CDEFS_H 1
20988#undef __P
20989#undef __PMT
20990#define __glibc_has_attribute(attr) __has_attribute (attr)
20991#define __glibc_has_builtin(name) __has_builtin (name)
20992#define __glibc_has_extension(ext) 0
20993#define __LEAF , __leaf__
20994#define __LEAF_ATTR __attribute__ ((__leaf__))
20995#define __THROW __attribute__ ((__nothrow__ __LEAF))
20996#define __THROWNL __attribute__ ((__nothrow__))
20997#define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
20998#define __NTHNL(fct) __attribute__ ((__nothrow__)) fct
20999#define __P(args) args
21000#define __PMT(args) args
21001#define __CONCAT(x,y) x ## y
21002#define __STRING(x) #x
21003#define __ptr_t void *
21004#define __BEGIN_DECLS
21005#define __END_DECLS
21006#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
21007#define __bos0(ptr) __builtin_object_size (ptr, 0)
21008#define __glibc_objsize0(__o) __bos0 (__o)
21009#define __glibc_objsize(__o) __bos (__o)
21010#define __glibc_safe_len_cond(__l,__s,__osz) ((__l) <= (__osz) / (__s))
21011#define __glibc_unsigned_or_positive(__l) ((__typeof (__l)) 0 < (__typeof (__l)) -1 || (__builtin_constant_p (__l) && (__l) > 0))
21012#define __glibc_safe_or_unknown_len(__l,__s,__osz) ((__builtin_constant_p (__osz) && (__osz) == (__SIZE_TYPE__) -1) || (__glibc_unsigned_or_positive (__l) && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), (__s), (__osz))) && __glibc_safe_len_cond ((__SIZE_TYPE__) (__l), (__s), (__osz))))
21013#define __glibc_unsafe_len(__l,__s,__osz) (__glibc_unsigned_or_positive (__l) && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), __s, __osz)) && !__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), __s, __osz))
21014#define __glibc_fortify(f,__l,__s,__osz,...) (__glibc_safe_or_unknown_len (__l, __s, __osz) ? __ ## f ## _alias (__VA_ARGS__) : (__glibc_unsafe_len (__l, __s, __osz) ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) : __ ## f ## _chk (__VA_ARGS__, __osz)))
21015#define __glibc_fortify_n(f,__l,__s,__osz,...) (__glibc_safe_or_unknown_len (__l, __s, __osz) ? __ ## f ## _alias (__VA_ARGS__) : (__glibc_unsafe_len (__l, __s, __osz) ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) : __ ## f ## _chk (__VA_ARGS__, (__osz) / (__s))))
21016#define __warnattr(msg) __attribute__((__warning__ (msg)))
21017#define __errordecl(name,msg) extern void name (void) __attribute__((__error__ (msg)))
21018#define __flexarr []
21019#define __glibc_c99_flexarr_available 1
21020#define __REDIRECT(name,proto,alias) name proto __asm__ (__ASMNAME (#alias))
21021#define __REDIRECT_NTH(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROW
21022#define __REDIRECT_NTHNL(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROWNL
21023#define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
21024#define __ASMNAME2(prefix,cname) __STRING (prefix) cname
21025#define __attribute_malloc__ __attribute__ ((__malloc__))
21026#define __attribute_alloc_size__(params) __attribute__ ((__alloc_size__ params))
21027#define __attribute_alloc_align__(param) __attribute__ ((__alloc_align__ param))
21028#define __attribute_pure__ __attribute__ ((__pure__))
21029#define __attribute_const__ __attribute__ ((__const__))
21030#define __attribute_maybe_unused__ __attribute__ ((__unused__))
21031#define __attribute_used__ __attribute__ ((__used__))
21032#define __attribute_noinline__ __attribute__ ((__noinline__))
21033#define __attribute_deprecated__ __attribute__ ((__deprecated__))
21034#define __attribute_deprecated_msg__(msg) __attribute__ ((__deprecated__ (msg)))
21035#define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
21036#define __attribute_format_strfmon__(a,b) __attribute__ ((__format__ (__strfmon__, a, b)))
21037#define __attribute_nonnull__(params) __attribute__ ((__nonnull__ params))
21038#define __nonnull(params) __attribute_nonnull__ (params)
21039#define __returns_nonnull __attribute__ ((__returns_nonnull__))
21040#define __attribute_warn_unused_result__ __attribute__ ((__warn_unused_result__))
21041#define __wur __attribute_warn_unused_result__
21042#undef __always_inline
21043#define __always_inline __inline __attribute__ ((__always_inline__))
21044#define __attribute_artificial__ __attribute__ ((__artificial__))
21045#define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
21046#define __extern_always_inline extern __always_inline __attribute__ ((__gnu_inline__))
21047#define __fortify_function __extern_always_inline __attribute_artificial__
21048#define __va_arg_pack() __builtin_va_arg_pack ()
21049#define __va_arg_pack_len() __builtin_va_arg_pack_len ()
21050#define __restrict_arr __restrict
21051#define __glibc_unlikely(cond) __builtin_expect ((cond), 0)
21052#define __glibc_likely(cond) __builtin_expect ((cond), 1)
21053#define __attribute_nonstring__ __attribute__ ((__nonstring__))
21054#undef __attribute_copy__
21055#define __attribute_copy__(arg) __attribute__ ((__copy__ (arg)))
21056#define __WORDSIZE 64
21057#define __WORDSIZE_TIME64_COMPAT32 1
21058#define __SYSCALL_WORDSIZE 64
21059#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
21060#define __LDBL_REDIR1(name,proto,alias) name proto
21061#define __LDBL_REDIR(name,proto) name proto
21062#define __LDBL_REDIR1_NTH(name,proto,alias) name proto __THROW
21063#define __LDBL_REDIR_NTH(name,proto) name proto __THROW
21064#define __LDBL_REDIR2_DECL(name)
21065#define __LDBL_REDIR_DECL(name)
21066#define __REDIRECT_LDBL(name,proto,alias) __REDIRECT (name, proto, alias)
21067#define __REDIRECT_NTH_LDBL(name,proto,alias) __REDIRECT_NTH (name, proto, alias)
21068#define __glibc_macro_warning1(message) _Pragma (#message)
21069#define __glibc_macro_warning(message) __glibc_macro_warning1 (GCC warning message)
21070#define __HAVE_GENERIC_SELECTION 1
21071#define __attr_access(x) __attribute__ ((__access__ x))
21072#define __fortified_attr_access(a,o,s) __attr_access ((a, o, s))
21073#define __attr_access_none(argno) __attribute__ ((__access__ (__none__, argno)))
21074#define __attr_dealloc(dealloc,argno) __attribute__ ((__malloc__ (dealloc, argno)))
21075#define __attr_dealloc_free __attr_dealloc (__builtin_free, 1)
21076#define __attribute_returns_twice__ __attribute__ ((__returns_twice__))
21077#define __USE_EXTERN_INLINES 1
21078#define __stub___compat_bdflush
21079#define __stub_chflags
21080#define __stub_fchflags
21081#define __stub_gtty
21082#define __stub_revoke
21083#define __stub_setlogin
21084#define __stub_sigreturn
21085#define __stub_stty
21086#undef __GLIBC_USE_LIB_EXT2
21087#define __GLIBC_USE_LIB_EXT2 1
21088#undef __GLIBC_USE_IEC_60559_BFP_EXT
21089#define __GLIBC_USE_IEC_60559_BFP_EXT 1
21090#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
21091#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
21092#undef __GLIBC_USE_IEC_60559_EXT
21093#define __GLIBC_USE_IEC_60559_EXT 1
21094#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
21095#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
21096#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
21097#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
21098#undef __GLIBC_USE_IEC_60559_TYPES_EXT
21099#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
21100#define __need_size_t
21101#define __need_NULL
21102#define __size_t__
21103#define __SIZE_T__
21104#define _SIZE_T
21105#define _SYS_SIZE_T_H
21106#define _T_SIZE_
21107#define _T_SIZE
21108#define __SIZE_T
21109#define _SIZE_T_
21110#define _BSD_SIZE_T_
21111#define _SIZE_T_DEFINED_
21112#define _SIZE_T_DEFINED
21113#define _BSD_SIZE_T_DEFINED_
21114#define _SIZE_T_DECLARED
21115#define __DEFINED_size_t
21116#define ___int_size_t_h
21117#define _GCC_SIZE_T
21118#define _SIZET_
21119#define __size_t
21120#undef __need_size_t
21121#undef NULL
21122#define NULL ((void *)0)
21123#undef __need_NULL
21124#define __need___va_list
21125#define _BITS_TYPES_H 1
21126#define __WORDSIZE 64
21127#define __WORDSIZE_TIME64_COMPAT32 1
21128#define __SYSCALL_WORDSIZE 64
21129#define __WORDSIZE 64
21130#define __WORDSIZE_TIME64_COMPAT32 1
21131#define __SYSCALL_WORDSIZE 64
21132#define __TIMESIZE __WORDSIZE
21133#define __S16_TYPE short int
21134#define __U16_TYPE unsigned short int
21135#define __S32_TYPE int
21136#define __U32_TYPE unsigned int
21137#define __SLONGWORD_TYPE long int
21138#define __ULONGWORD_TYPE unsigned long int
21139#define __SQUAD_TYPE long int
21140#define __UQUAD_TYPE unsigned long int
21141#define __SWORD_TYPE long int
21142#define __UWORD_TYPE unsigned long int
21143#define __SLONG32_TYPE int
21144#define __ULONG32_TYPE unsigned int
21145#define __S64_TYPE long int
21146#define __U64_TYPE unsigned long int
21147#define __STD_TYPE typedef
21148#define _BITS_TYPESIZES_H 1
21149#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
21150#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
21151#define __DEV_T_TYPE __UQUAD_TYPE
21152#define __UID_T_TYPE __U32_TYPE
21153#define __GID_T_TYPE __U32_TYPE
21154#define __INO_T_TYPE __SYSCALL_ULONG_TYPE
21155#define __INO64_T_TYPE __UQUAD_TYPE
21156#define __MODE_T_TYPE __U32_TYPE
21157#define __NLINK_T_TYPE __SYSCALL_ULONG_TYPE
21158#define __FSWORD_T_TYPE __SYSCALL_SLONG_TYPE
21159#define __OFF_T_TYPE __SYSCALL_SLONG_TYPE
21160#define __OFF64_T_TYPE __SQUAD_TYPE
21161#define __PID_T_TYPE __S32_TYPE
21162#define __RLIM_T_TYPE __SYSCALL_ULONG_TYPE
21163#define __RLIM64_T_TYPE __UQUAD_TYPE
21164#define __BLKCNT_T_TYPE __SYSCALL_SLONG_TYPE
21165#define __BLKCNT64_T_TYPE __SQUAD_TYPE
21166#define __FSBLKCNT_T_TYPE __SYSCALL_ULONG_TYPE
21167#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
21168#define __FSFILCNT_T_TYPE __SYSCALL_ULONG_TYPE
21169#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
21170#define __ID_T_TYPE __U32_TYPE
21171#define __CLOCK_T_TYPE __SYSCALL_SLONG_TYPE
21172#define __TIME_T_TYPE __SYSCALL_SLONG_TYPE
21173#define __USECONDS_T_TYPE __U32_TYPE
21174#define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE
21175#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
21176#define __DADDR_T_TYPE __S32_TYPE
21177#define __KEY_T_TYPE __S32_TYPE
21178#define __CLOCKID_T_TYPE __S32_TYPE
21179#define __TIMER_T_TYPE void *
21180#define __BLKSIZE_T_TYPE __SYSCALL_SLONG_TYPE
21181#define __FSID_T_TYPE struct { int __val[2]; }
21182#define __SSIZE_T_TYPE __SWORD_TYPE
21183#define __CPU_MASK_TYPE __SYSCALL_ULONG_TYPE
21184#define __OFF_T_MATCHES_OFF64_T 1
21185#define __INO_T_MATCHES_INO64_T 1
21186#define __RLIM_T_MATCHES_RLIM64_T 1
21187#define __STATFS_MATCHES_STATFS64 1
21188#define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
21189#define __FD_SETSIZE 1024
21190#define _BITS_TIME64_H 1
21191#define __TIME64_T_TYPE __TIME_T_TYPE
21192#undef __STD_TYPE
21193#define _____fpos_t_defined 1
21194#define ____mbstate_t_defined 1
21195#define _____fpos64_t_defined 1
21196#define ____FILE_defined 1
21197#define __FILE_defined 1
21198#define __struct_FILE_defined 1
21199#define __getc_unlocked_body(_fp) (__glibc_unlikely ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end) ? __uflow (_fp) : *(unsigned char *) (_fp)->_IO_read_ptr++)
21200#define __putc_unlocked_body(_ch,_fp) (__glibc_unlikely ((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end) ? __overflow (_fp, (unsigned char) (_ch)) : (unsigned char) (*(_fp)->_IO_write_ptr++ = (_ch)))
21201#define _IO_EOF_SEEN 0x0010
21202#define __feof_unlocked_body(_fp) (((_fp)->_flags & _IO_EOF_SEEN) != 0)
21203#define _IO_ERR_SEEN 0x0020
21204#define __ferror_unlocked_body(_fp) (((_fp)->_flags & _IO_ERR_SEEN) != 0)
21205#define _IO_USER_LOCK 0x8000
21206#define __cookie_io_functions_t_defined 1
21207#define __off_t_defined
21208#define __off64_t_defined
21209#define __ssize_t_defined
21210#define _IOFBF 0
21211#define _IOLBF 1
21212#define _IONBF 2
21213#define BUFSIZ 8192
21214#define EOF (-1)
21215#define SEEK_SET 0
21216#define SEEK_CUR 1
21217#define SEEK_END 2
21218#define SEEK_DATA 3
21219#define SEEK_HOLE 4
21220#define P_tmpdir "/tmp"
21221#define _BITS_STDIO_LIM_H 1
21222#define L_tmpnam 20
21223#define TMP_MAX 238328
21224#define FILENAME_MAX 4096
21225#define L_ctermid 9
21226#define L_cuserid 9
21227#undef FOPEN_MAX
21228#define FOPEN_MAX 16
21229#define _PRINTF_NAN_LEN_MAX 4
21230#define stdin stdin
21231#define stdout stdout
21232#define stderr stderr
21233#define RENAME_NOREPLACE (1 << 0)
21234#define RENAME_EXCHANGE (1 << 1)
21235#define RENAME_WHITEOUT (1 << 2)
21236#undef __attr_dealloc_fclose
21237#define __attr_dealloc_fclose __attr_dealloc (fclose, 1)
21238#define _BITS_FLOATN_H
21239#define __HAVE_FLOAT128 1
21240#define __HAVE_DISTINCT_FLOAT128 1
21241#define __HAVE_FLOAT64X 1
21242#define __HAVE_FLOAT64X_LONG_DOUBLE 1
21243#define __f128(x) x ##f128
21244#define __CFLOAT128 _Complex _Float128
21245#define _BITS_FLOATN_COMMON_H
21246#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
21247#define __HAVE_FLOAT16 0
21248#define __HAVE_FLOAT32 1
21249#define __HAVE_FLOAT64 1
21250#define __HAVE_FLOAT32X 1
21251#define __HAVE_FLOAT128X 0
21252#define __HAVE_DISTINCT_FLOAT16 __HAVE_FLOAT16
21253#define __HAVE_DISTINCT_FLOAT32 0
21254#define __HAVE_DISTINCT_FLOAT64 0
21255#define __HAVE_DISTINCT_FLOAT32X 0
21256#define __HAVE_DISTINCT_FLOAT64X 0
21257#define __HAVE_DISTINCT_FLOAT128X __HAVE_FLOAT128X
21258#define __HAVE_FLOAT128_UNLIKE_LDBL (__HAVE_DISTINCT_FLOAT128 && __LDBL_MANT_DIG__ != 113)
21259#define __HAVE_FLOATN_NOT_TYPEDEF 1
21260#define __f32(x) x ##f32
21261#define __f64(x) x ##f64
21262#define __f32x(x) x ##f32x
21263#define __f64x(x) x ##f64x
21264#define __CFLOAT32 _Complex _Float32
21265#define __CFLOAT64 _Complex _Float64
21266#define __CFLOAT32X _Complex _Float32x
21267#define __CFLOAT64X _Complex _Float64x
21268#define _BITS_STDIO_H 1
21269#define __STDIO_INLINE __extern_inline
21270#define fread_unlocked(ptr,size,n,stream) (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) && (size_t) (size) * (size_t) (n) <= 8 && (size_t) (size) != 0) ? ({ char *__ptr = (char *) (ptr); FILE *__stream = (stream); size_t __cnt; for (__cnt = (size_t) (size) * (size_t) (n); __cnt > 0; --__cnt) { int __c = getc_unlocked (__stream); if (__c == EOF) break; *__ptr++ = __c; } ((size_t) (size) * (size_t) (n) - __cnt) / (size_t) (size); }) : (((__builtin_constant_p (size) && (size_t) (size) == 0) || (__builtin_constant_p (n) && (size_t) (n) == 0)) ? ((void) (ptr), (void) (stream), (void) (size), (void) (n), (size_t) 0) : fread_unlocked (ptr, size, n, stream))))
21271#define fwrite_unlocked(ptr,size,n,stream) (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) && (size_t) (size) * (size_t) (n) <= 8 && (size_t) (size) != 0) ? ({ const char *__ptr = (const char *) (ptr); FILE *__stream = (stream); size_t __cnt; for (__cnt = (size_t) (size) * (size_t) (n); __cnt > 0; --__cnt) if (putc_unlocked (*__ptr++, __stream) == EOF) break; ((size_t) (size) * (size_t) (n) - __cnt) / (size_t) (size); }) : (((__builtin_constant_p (size) && (size_t) (size) == 0) || (__builtin_constant_p (n) && (size_t) (n) == 0)) ? ((void) (ptr), (void) (stream), (void) (size), (void) (n), (size_t) 0) : fwrite_unlocked (ptr, size, n, stream))))
21272#undef __STDIO_INLINE
21273#define _BITS_STDIO2_H 1
21274#undef fread_unlocked
21275#define _SYS_TYPES_H 1
21276#define __u_char_defined
21277#define __ino_t_defined
21278#define __ino64_t_defined
21279#define __dev_t_defined
21280#define __gid_t_defined
21281#define __mode_t_defined
21282#define __nlink_t_defined
21283#define __uid_t_defined
21284#define __pid_t_defined
21285#define __id_t_defined
21286#define __daddr_t_defined
21287#define __key_t_defined
21288#define __clock_t_defined 1
21289#define __clockid_t_defined 1
21290#define __time_t_defined 1
21291#define __timer_t_defined 1
21292#define __useconds_t_defined
21293#define __suseconds_t_defined
21294#define __need_size_t
21295#undef __need_size_t
21296#undef __need_NULL
21297#define _BITS_STDINT_INTN_H 1
21298#define __BIT_TYPES_DEFINED__ 1
21299#define _ENDIAN_H 1
21300#define _BITS_ENDIAN_H 1
21301#define __LITTLE_ENDIAN 1234
21302#define __BIG_ENDIAN 4321
21303#define __PDP_ENDIAN 3412
21304#define _BITS_ENDIANNESS_H 1
21305#define __BYTE_ORDER __LITTLE_ENDIAN
21306#define __FLOAT_WORD_ORDER __BYTE_ORDER
21307#define __LONG_LONG_PAIR(HI,LO) LO, HI
21308#define LITTLE_ENDIAN __LITTLE_ENDIAN
21309#define BIG_ENDIAN __BIG_ENDIAN
21310#define PDP_ENDIAN __PDP_ENDIAN
21311#define BYTE_ORDER __BYTE_ORDER
21312#define _BITS_BYTESWAP_H 1
21313#define __bswap_constant_16(x) ((__uint16_t) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
21314#define __bswap_constant_32(x) ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24))
21315#define __bswap_constant_64(x) ((((x) & 0xff00000000000000ull) >> 56) | (((x) & 0x00ff000000000000ull) >> 40) | (((x) & 0x0000ff0000000000ull) >> 24) | (((x) & 0x000000ff00000000ull) >> 8) | (((x) & 0x00000000ff000000ull) << 8) | (((x) & 0x0000000000ff0000ull) << 24) | (((x) & 0x000000000000ff00ull) << 40) | (((x) & 0x00000000000000ffull) << 56))
21316#define _BITS_UINTN_IDENTITY_H 1
21317#define htobe16(x) __bswap_16 (x)
21318#define htole16(x) __uint16_identity (x)
21319#define be16toh(x) __bswap_16 (x)
21320#define le16toh(x) __uint16_identity (x)
21321#define htobe32(x) __bswap_32 (x)
21322#define htole32(x) __uint32_identity (x)
21323#define be32toh(x) __bswap_32 (x)
21324#define le32toh(x) __uint32_identity (x)
21325#define htobe64(x) __bswap_64 (x)
21326#define htole64(x) __uint64_identity (x)
21327#define be64toh(x) __bswap_64 (x)
21328#define le64toh(x) __uint64_identity (x)
21329#define _SYS_SELECT_H 1
21330#define __FD_ZERO(s) do { unsigned int __i; fd_set *__arr = (s); for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) __FDS_BITS (__arr)[__i] = 0; } while (0)
21331#define __FD_SET(d,s) ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
21332#define __FD_CLR(d,s) ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
21333#define __FD_ISSET(d,s) ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
21334#define __sigset_t_defined 1
21335#define ____sigset_t_defined
21336#define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int)))
21337#define __timeval_defined 1
21338#define _STRUCT_TIMESPEC 1
21339#undef __NFDBITS
21340#define __NFDBITS (8 * (int) sizeof (__fd_mask))
21341#define __FD_ELT(d) ((d) / __NFDBITS)
21342#define __FD_MASK(d) ((__fd_mask) (1UL << ((d) % __NFDBITS)))
21343#define __FDS_BITS(set) ((set)->fds_bits)
21344#define FD_SETSIZE __FD_SETSIZE
21345#define NFDBITS __NFDBITS
21346#define FD_SET(fd,fdsetp) __FD_SET (fd, fdsetp)
21347#define FD_CLR(fd,fdsetp) __FD_CLR (fd, fdsetp)
21348#define FD_ISSET(fd,fdsetp) __FD_ISSET (fd, fdsetp)
21349#define FD_ZERO(fdsetp) __FD_ZERO (fdsetp)
21350#undef __FD_ELT
21351#define __FD_ELT(d) __extension__ ({ long int __d = (d); (__builtin_constant_p (__d) ? (0 <= __d && __d < __FD_SETSIZE ? (__d / __NFDBITS) : __fdelt_warn (__d)) : __fdelt_chk (__d)); })
21352#define __blksize_t_defined
21353#define __blkcnt_t_defined
21354#define __fsblkcnt_t_defined
21355#define __fsfilcnt_t_defined
21356#define _BITS_PTHREADTYPES_COMMON_H 1
21357#define _THREAD_SHARED_TYPES_H 1
21358#define _BITS_PTHREADTYPES_ARCH_H 1
21359#define __WORDSIZE 64
21360#define __WORDSIZE_TIME64_COMPAT32 1
21361#define __SYSCALL_WORDSIZE 64
21362#define __SIZEOF_PTHREAD_MUTEX_T 40
21363#define __SIZEOF_PTHREAD_ATTR_T 56
21364#define __SIZEOF_PTHREAD_RWLOCK_T 56
21365#define __SIZEOF_PTHREAD_BARRIER_T 32
21366#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
21367#define __SIZEOF_PTHREAD_COND_T 48
21368#define __SIZEOF_PTHREAD_CONDATTR_T 4
21369#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
21370#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
21371#define __LOCK_ALIGNMENT
21372#define __ONCE_ALIGNMENT
21373#define _BITS_ATOMIC_WIDE_COUNTER_H
21374#define _THREAD_MUTEX_INTERNAL_H 1
21375#define __PTHREAD_MUTEX_HAVE_PREV 1
21376#define __PTHREAD_MUTEX_INITIALIZER(__kind) 0, 0, 0, 0, __kind, 0, 0, { 0, 0 }
21377#define _RWLOCK_INTERNAL_H
21378#define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 }
21379#define __PTHREAD_RWLOCK_INITIALIZER(__flags) 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags
21380#define __ONCE_FLAG_INIT { 0 }
21381#define __have_pthread_attr_t 1
21382#define _SYS_STAT_H 1
21383#define _BITS_STAT_H 1
21384#define _BITS_STRUCT_STAT_H 1
21385#define st_atime st_atim.tv_sec
21386#define st_mtime st_mtim.tv_sec
21387#define st_ctime st_ctim.tv_sec
21388#define _STATBUF_ST_BLKSIZE
21389#define _STATBUF_ST_RDEV
21390#define _STATBUF_ST_NSEC
21391#define __S_IFMT 0170000
21392#define __S_IFDIR 0040000
21393#define __S_IFCHR 0020000
21394#define __S_IFBLK 0060000
21395#define __S_IFREG 0100000
21396#define __S_IFIFO 0010000
21397#define __S_IFLNK 0120000
21398#define __S_IFSOCK 0140000
21399#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode)
21400#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode)
21401#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode)
21402#define __S_ISUID 04000
21403#define __S_ISGID 02000
21404#define __S_ISVTX 01000
21405#define __S_IREAD 0400
21406#define __S_IWRITE 0200
21407#define __S_IEXEC 0100
21408#define UTIME_NOW ((1l << 30) - 1l)
21409#define UTIME_OMIT ((1l << 30) - 2l)
21410#define S_IFMT __S_IFMT
21411#define S_IFDIR __S_IFDIR
21412#define S_IFCHR __S_IFCHR
21413#define S_IFBLK __S_IFBLK
21414#define S_IFREG __S_IFREG
21415#define S_IFIFO __S_IFIFO
21416#define S_IFLNK __S_IFLNK
21417#define S_IFSOCK __S_IFSOCK
21418#define __S_ISTYPE(mode,mask) (((mode) & __S_IFMT) == (mask))
21419#define S_ISDIR(mode) __S_ISTYPE((mode), __S_IFDIR)
21420#define S_ISCHR(mode) __S_ISTYPE((mode), __S_IFCHR)
21421#define S_ISBLK(mode) __S_ISTYPE((mode), __S_IFBLK)
21422#define S_ISREG(mode) __S_ISTYPE((mode), __S_IFREG)
21423#define S_ISFIFO(mode) __S_ISTYPE((mode), __S_IFIFO)
21424#define S_ISLNK(mode) __S_ISTYPE((mode), __S_IFLNK)
21425#define S_ISSOCK(mode) __S_ISTYPE((mode), __S_IFSOCK)
21426#define S_TYPEISMQ(buf) __S_TYPEISMQ(buf)
21427#define S_TYPEISSEM(buf) __S_TYPEISSEM(buf)
21428#define S_TYPEISSHM(buf) __S_TYPEISSHM(buf)
21429#define S_ISUID __S_ISUID
21430#define S_ISGID __S_ISGID
21431#define S_ISVTX __S_ISVTX
21432#define S_IRUSR __S_IREAD
21433#define S_IWUSR __S_IWRITE
21434#define S_IXUSR __S_IEXEC
21435#define S_IRWXU (__S_IREAD|__S_IWRITE|__S_IEXEC)
21436#define S_IREAD S_IRUSR
21437#define S_IWRITE S_IWUSR
21438#define S_IEXEC S_IXUSR
21439#define S_IRGRP (S_IRUSR >> 3)
21440#define S_IWGRP (S_IWUSR >> 3)
21441#define S_IXGRP (S_IXUSR >> 3)
21442#define S_IRWXG (S_IRWXU >> 3)
21443#define S_IROTH (S_IRGRP >> 3)
21444#define S_IWOTH (S_IWGRP >> 3)
21445#define S_IXOTH (S_IXGRP >> 3)
21446#define S_IRWXO (S_IRWXG >> 3)
21447#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
21448#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
21449#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
21450#define S_BLKSIZE 512
21451#define _LINUX_STAT_H
21452#define _LINUX_TYPES_H
21453#define _ASM_GENERIC_TYPES_H
21454#define _ASM_GENERIC_INT_LL64_H
21455#define __ASM_X86_BITSPERLONG_H
21456#define __BITS_PER_LONG 64
21457#define __ASM_GENERIC_BITS_PER_LONG
21458#define _LINUX_POSIX_TYPES_H
21459#define _LINUX_STDDEF_H
21460#define __struct_group(TAG,NAME,ATTRS,MEMBERS...) union { struct { MEMBERS } ATTRS; struct TAG { MEMBERS } ATTRS NAME; }
21461#define __DECLARE_FLEX_ARRAY(TYPE,NAME) struct { struct { } __empty_ ## NAME; TYPE NAME[]; }
21462#undef __FD_SETSIZE
21463#define __FD_SETSIZE 1024
21464#define _ASM_X86_POSIX_TYPES_64_H
21465#define __kernel_old_uid_t __kernel_old_uid_t
21466#define __kernel_old_dev_t __kernel_old_dev_t
21467#define __ASM_GENERIC_POSIX_TYPES_H
21468#define __bitwise__
21469#define __bitwise __bitwise__
21470#define __aligned_u64 __u64 __attribute__((aligned(8)))
21471#define __aligned_be64 __be64 __attribute__((aligned(8)))
21472#define __aligned_le64 __le64 __attribute__((aligned(8)))
21473#define STATX_TYPE 0x00000001U
21474#define STATX_MODE 0x00000002U
21475#define STATX_NLINK 0x00000004U
21476#define STATX_UID 0x00000008U
21477#define STATX_GID 0x00000010U
21478#define STATX_ATIME 0x00000020U
21479#define STATX_MTIME 0x00000040U
21480#define STATX_CTIME 0x00000080U
21481#define STATX_INO 0x00000100U
21482#define STATX_SIZE 0x00000200U
21483#define STATX_BLOCKS 0x00000400U
21484#define STATX_BASIC_STATS 0x000007ffU
21485#define STATX_BTIME 0x00000800U
21486#define STATX_MNT_ID 0x00001000U
21487#define STATX__RESERVED 0x80000000U
21488#define STATX_ALL 0x00000fffU
21489#define STATX_ATTR_COMPRESSED 0x00000004
21490#define STATX_ATTR_IMMUTABLE 0x00000010
21491#define STATX_ATTR_APPEND 0x00000020
21492#define STATX_ATTR_NODUMP 0x00000040
21493#define STATX_ATTR_ENCRYPTED 0x00000800
21494#define STATX_ATTR_AUTOMOUNT 0x00001000
21495#define STATX_ATTR_MOUNT_ROOT 0x00002000
21496#define STATX_ATTR_VERITY 0x00100000
21497#define STATX_ATTR_DAX 0x00200000
21498#define __statx_timestamp_defined 1
21499#define __statx_defined 1
21500#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
21501#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
21502#undef __GLIBC_USE_LIB_EXT2
21503#define __GLIBC_USE_LIB_EXT2 1
21504#undef __GLIBC_USE_IEC_60559_BFP_EXT
21505#define __GLIBC_USE_IEC_60559_BFP_EXT 1
21506#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
21507#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
21508#undef __GLIBC_USE_IEC_60559_EXT
21509#define __GLIBC_USE_IEC_60559_EXT 1
21510#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
21511#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
21512#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
21513#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
21514#undef __GLIBC_USE_IEC_60559_TYPES_EXT
21515#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
21516#define __need_size_t
21517#define __need_wchar_t
21518#define __need_NULL
21519#undef __need_size_t
21520#define __wchar_t__
21521#define __WCHAR_T__
21522#define _WCHAR_T
21523#define _T_WCHAR_
21524#define _T_WCHAR
21525#define __WCHAR_T
21526#define _WCHAR_T_
21527#define _BSD_WCHAR_T_
21528#define _WCHAR_T_DEFINED_
21529#define _WCHAR_T_DEFINED
21530#define _WCHAR_T_H
21531#define ___int_wchar_t_h
21532#define __INT_WCHAR_T_H
21533#define _GCC_WCHAR_T
21534#define _WCHAR_T_DECLARED
21535#define __DEFINED_wchar_t
21536#undef _BSD_WCHAR_T_
21537#undef __need_wchar_t
21538#undef NULL
21539#define NULL ((void *)0)
21540#undef __need_NULL
21541#define _STDLIB_H 1
21542#define WNOHANG 1
21543#define WUNTRACED 2
21544#define WSTOPPED 2
21545#define WEXITED 4
21546#define WCONTINUED 8
21547#define WNOWAIT 0x01000000
21548#define __WNOTHREAD 0x20000000
21549#define __WALL 0x40000000
21550#define __WCLONE 0x80000000
21551#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8)
21552#define __WTERMSIG(status) ((status) & 0x7f)
21553#define __WSTOPSIG(status) __WEXITSTATUS(status)
21554#define __WIFEXITED(status) (__WTERMSIG(status) == 0)
21555#define __WIFSIGNALED(status) (((signed char) (((status) & 0x7f) + 1) >> 1) > 0)
21556#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
21557#define __WIFCONTINUED(status) ((status) == __W_CONTINUED)
21558#define __WCOREDUMP(status) ((status) & __WCOREFLAG)
21559#define __W_EXITCODE(ret,sig) ((ret) << 8 | (sig))
21560#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f)
21561#define __W_CONTINUED 0xffff
21562#define __WCOREFLAG 0x80
21563#define WEXITSTATUS(status) __WEXITSTATUS (status)
21564#define WTERMSIG(status) __WTERMSIG (status)
21565#define WSTOPSIG(status) __WSTOPSIG (status)
21566#define WIFEXITED(status) __WIFEXITED (status)
21567#define WIFSIGNALED(status) __WIFSIGNALED (status)
21568#define WIFSTOPPED(status) __WIFSTOPPED (status)
21569#define WIFCONTINUED(status) __WIFCONTINUED (status)
21570#define __ldiv_t_defined 1
21571#define __lldiv_t_defined 1
21572#define RAND_MAX 2147483647
21573#define EXIT_FAILURE 1
21574#define EXIT_SUCCESS 0
21575#define MB_CUR_MAX (__ctype_get_mb_cur_max ())
21576#define _BITS_TYPES_LOCALE_T_H 1
21577#define _BITS_TYPES___LOCALE_T_H 1
21578#define _ALLOCA_H 1
21579#define __need_size_t
21580#undef __need_size_t
21581#undef __need_NULL
21582#undef alloca
21583#define alloca(size) __builtin_alloca (size)
21584#define __COMPAR_FN_T
21585#pragma GCC diagnostic push
21586#pragma GCC diagnostic ignored "-Wcast-qual"
21587#pragma GCC diagnostic pop
21588#define __STDLIB_MB_LEN_MAX 16
21589#define _STDDEF_H
21590#define _STDDEF_H_
21591#define _ANSI_STDDEF_H
21592#define _PTRDIFF_T
21593#define _T_PTRDIFF_
21594#define _T_PTRDIFF
21595#define __PTRDIFF_T
21596#define _PTRDIFF_T_
21597#define _BSD_PTRDIFF_T_
21598#define ___int_ptrdiff_t_h
21599#define _GCC_PTRDIFF_T
21600#define _PTRDIFF_T_DECLARED
21601#define __DEFINED_ptrdiff_t
21602#undef __need_ptrdiff_t
21603#undef __need_size_t
21604#undef __need_wchar_t
21605#undef NULL
21606#define NULL ((void *)0)
21607#undef __need_NULL
21608#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
21609#define _STRING_H 1
21610#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
21611#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
21612#undef __GLIBC_USE_LIB_EXT2
21613#define __GLIBC_USE_LIB_EXT2 1
21614#undef __GLIBC_USE_IEC_60559_BFP_EXT
21615#define __GLIBC_USE_IEC_60559_BFP_EXT 1
21616#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
21617#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
21618#undef __GLIBC_USE_IEC_60559_EXT
21619#define __GLIBC_USE_IEC_60559_EXT 1
21620#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
21621#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
21622#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
21623#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
21624#undef __GLIBC_USE_IEC_60559_TYPES_EXT
21625#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
21626#define __need_size_t
21627#define __need_NULL
21628#undef __need_ptrdiff_t
21629#undef __need_size_t
21630#undef __need_wchar_t
21631#undef NULL
21632#define NULL ((void *)0)
21633#undef __need_NULL
21634#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
21635#define strdupa(s) (__extension__ ({ const char *__old = (s); size_t __len = strlen (__old) + 1; char *__new = (char *) __builtin_alloca (__len); (char *) memcpy (__new, __old, __len); }))
21636#define strndupa(s,n) (__extension__ ({ const char *__old = (s); size_t __len = strnlen (__old, (n)); char *__new = (char *) __builtin_alloca (__len + 1); __new[__len] = '\0'; (char *) memcpy (__new, __old, __len); }))
21637#define _STRINGS_H 1
21638#define __need_size_t
21639#undef __need_ptrdiff_t
21640#undef __need_size_t
21641#undef __need_wchar_t
21642#undef NULL
21643#define NULL ((void *)0)
21644#undef __need_NULL
21645#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
21646#define __STRINGS_FORTIFIED 1
21647#define _BITS_STRING_FORTIFIED_H 1
21648#define _INTTYPES_H 1
21649#define _STDINT_H 1
21650#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
21651#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
21652#undef __GLIBC_USE_LIB_EXT2
21653#define __GLIBC_USE_LIB_EXT2 1
21654#undef __GLIBC_USE_IEC_60559_BFP_EXT
21655#define __GLIBC_USE_IEC_60559_BFP_EXT 1
21656#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
21657#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
21658#undef __GLIBC_USE_IEC_60559_EXT
21659#define __GLIBC_USE_IEC_60559_EXT 1
21660#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
21661#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
21662#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
21663#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
21664#undef __GLIBC_USE_IEC_60559_TYPES_EXT
21665#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
21666#define _BITS_WCHAR_H 1
21667#define __WCHAR_MAX __WCHAR_MAX__
21668#define __WCHAR_MIN __WCHAR_MIN__
21669#define __WORDSIZE 64
21670#define __WORDSIZE_TIME64_COMPAT32 1
21671#define __SYSCALL_WORDSIZE 64
21672#define _BITS_STDINT_UINTN_H 1
21673#define __intptr_t_defined
21674#define __INT64_C(c) c ## L
21675#define __UINT64_C(c) c ## UL
21676#define INT8_MIN (-128)
21677#define INT16_MIN (-32767-1)
21678#define INT32_MIN (-2147483647-1)
21679#define INT64_MIN (-__INT64_C(9223372036854775807)-1)
21680#define INT8_MAX (127)
21681#define INT16_MAX (32767)
21682#define INT32_MAX (2147483647)
21683#define INT64_MAX (__INT64_C(9223372036854775807))
21684#define UINT8_MAX (255)
21685#define UINT16_MAX (65535)
21686#define UINT32_MAX (4294967295U)
21687#define UINT64_MAX (__UINT64_C(18446744073709551615))
21688#define INT_LEAST8_MIN (-128)
21689#define INT_LEAST16_MIN (-32767-1)
21690#define INT_LEAST32_MIN (-2147483647-1)
21691#define INT_LEAST64_MIN (-__INT64_C(9223372036854775807)-1)
21692#define INT_LEAST8_MAX (127)
21693#define INT_LEAST16_MAX (32767)
21694#define INT_LEAST32_MAX (2147483647)
21695#define INT_LEAST64_MAX (__INT64_C(9223372036854775807))
21696#define UINT_LEAST8_MAX (255)
21697#define UINT_LEAST16_MAX (65535)
21698#define UINT_LEAST32_MAX (4294967295U)
21699#define UINT_LEAST64_MAX (__UINT64_C(18446744073709551615))
21700#define INT_FAST8_MIN (-128)
21701#define INT_FAST16_MIN (-9223372036854775807L-1)
21702#define INT_FAST32_MIN (-9223372036854775807L-1)
21703#define INT_FAST64_MIN (-__INT64_C(9223372036854775807)-1)
21704#define INT_FAST8_MAX (127)
21705#define INT_FAST16_MAX (9223372036854775807L)
21706#define INT_FAST32_MAX (9223372036854775807L)
21707#define INT_FAST64_MAX (__INT64_C(9223372036854775807))
21708#define UINT_FAST8_MAX (255)
21709#define UINT_FAST16_MAX (18446744073709551615UL)
21710#define UINT_FAST32_MAX (18446744073709551615UL)
21711#define UINT_FAST64_MAX (__UINT64_C(18446744073709551615))
21712#define INTPTR_MIN (-9223372036854775807L-1)
21713#define INTPTR_MAX (9223372036854775807L)
21714#define UINTPTR_MAX (18446744073709551615UL)
21715#define INTMAX_MIN (-__INT64_C(9223372036854775807)-1)
21716#define INTMAX_MAX (__INT64_C(9223372036854775807))
21717#define UINTMAX_MAX (__UINT64_C(18446744073709551615))
21718#define PTRDIFF_MIN (-9223372036854775807L-1)
21719#define PTRDIFF_MAX (9223372036854775807L)
21720#define SIG_ATOMIC_MIN (-2147483647-1)
21721#define SIG_ATOMIC_MAX (2147483647)
21722#define SIZE_MAX (18446744073709551615UL)
21723#define WCHAR_MIN __WCHAR_MIN
21724#define WCHAR_MAX __WCHAR_MAX
21725#define WINT_MIN (0u)
21726#define WINT_MAX (4294967295u)
21727#define INT8_C(c) c
21728#define INT16_C(c) c
21729#define INT32_C(c) c
21730#define INT64_C(c) c ## L
21731#define UINT8_C(c) c
21732#define UINT16_C(c) c
21733#define UINT32_C(c) c ## U
21734#define UINT64_C(c) c ## UL
21735#define INTMAX_C(c) c ## L
21736#define UINTMAX_C(c) c ## UL
21737#define INT8_WIDTH 8
21738#define UINT8_WIDTH 8
21739#define INT16_WIDTH 16
21740#define UINT16_WIDTH 16
21741#define INT32_WIDTH 32
21742#define UINT32_WIDTH 32
21743#define INT64_WIDTH 64
21744#define UINT64_WIDTH 64
21745#define INT_LEAST8_WIDTH 8
21746#define UINT_LEAST8_WIDTH 8
21747#define INT_LEAST16_WIDTH 16
21748#define UINT_LEAST16_WIDTH 16
21749#define INT_LEAST32_WIDTH 32
21750#define UINT_LEAST32_WIDTH 32
21751#define INT_LEAST64_WIDTH 64
21752#define UINT_LEAST64_WIDTH 64
21753#define INT_FAST8_WIDTH 8
21754#define UINT_FAST8_WIDTH 8
21755#define INT_FAST16_WIDTH __WORDSIZE
21756#define UINT_FAST16_WIDTH __WORDSIZE
21757#define INT_FAST32_WIDTH __WORDSIZE
21758#define UINT_FAST32_WIDTH __WORDSIZE
21759#define INT_FAST64_WIDTH 64
21760#define UINT_FAST64_WIDTH 64
21761#define INTPTR_WIDTH __WORDSIZE
21762#define UINTPTR_WIDTH __WORDSIZE
21763#define INTMAX_WIDTH 64
21764#define UINTMAX_WIDTH 64
21765#define PTRDIFF_WIDTH __WORDSIZE
21766#define SIG_ATOMIC_WIDTH 32
21767#define SIZE_WIDTH __WORDSIZE
21768#define WCHAR_WIDTH 32
21769#define WINT_WIDTH 32
21770#define _GCC_WRAP_STDINT_H
21771#define ____gwchar_t_defined 1
21772#define __PRI64_PREFIX "l"
21773#define __PRIPTR_PREFIX "l"
21774#define PRId8 "d"
21775#define PRId16 "d"
21776#define PRId32 "d"
21777#define PRId64 __PRI64_PREFIX "d"
21778#define PRIdLEAST8 "d"
21779#define PRIdLEAST16 "d"
21780#define PRIdLEAST32 "d"
21781#define PRIdLEAST64 __PRI64_PREFIX "d"
21782#define PRIdFAST8 "d"
21783#define PRIdFAST16 __PRIPTR_PREFIX "d"
21784#define PRIdFAST32 __PRIPTR_PREFIX "d"
21785#define PRIdFAST64 __PRI64_PREFIX "d"
21786#define PRIi8 "i"
21787#define PRIi16 "i"
21788#define PRIi32 "i"
21789#define PRIi64 __PRI64_PREFIX "i"
21790#define PRIiLEAST8 "i"
21791#define PRIiLEAST16 "i"
21792#define PRIiLEAST32 "i"
21793#define PRIiLEAST64 __PRI64_PREFIX "i"
21794#define PRIiFAST8 "i"
21795#define PRIiFAST16 __PRIPTR_PREFIX "i"
21796#define PRIiFAST32 __PRIPTR_PREFIX "i"
21797#define PRIiFAST64 __PRI64_PREFIX "i"
21798#define PRIo8 "o"
21799#define PRIo16 "o"
21800#define PRIo32 "o"
21801#define PRIo64 __PRI64_PREFIX "o"
21802#define PRIoLEAST8 "o"
21803#define PRIoLEAST16 "o"
21804#define PRIoLEAST32 "o"
21805#define PRIoLEAST64 __PRI64_PREFIX "o"
21806#define PRIoFAST8 "o"
21807#define PRIoFAST16 __PRIPTR_PREFIX "o"
21808#define PRIoFAST32 __PRIPTR_PREFIX "o"
21809#define PRIoFAST64 __PRI64_PREFIX "o"
21810#define PRIu8 "u"
21811#define PRIu16 "u"
21812#define PRIu32 "u"
21813#define PRIu64 __PRI64_PREFIX "u"
21814#define PRIuLEAST8 "u"
21815#define PRIuLEAST16 "u"
21816#define PRIuLEAST32 "u"
21817#define PRIuLEAST64 __PRI64_PREFIX "u"
21818#define PRIuFAST8 "u"
21819#define PRIuFAST16 __PRIPTR_PREFIX "u"
21820#define PRIuFAST32 __PRIPTR_PREFIX "u"
21821#define PRIuFAST64 __PRI64_PREFIX "u"
21822#define PRIx8 "x"
21823#define PRIx16 "x"
21824#define PRIx32 "x"
21825#define PRIx64 __PRI64_PREFIX "x"
21826#define PRIxLEAST8 "x"
21827#define PRIxLEAST16 "x"
21828#define PRIxLEAST32 "x"
21829#define PRIxLEAST64 __PRI64_PREFIX "x"
21830#define PRIxFAST8 "x"
21831#define PRIxFAST16 __PRIPTR_PREFIX "x"
21832#define PRIxFAST32 __PRIPTR_PREFIX "x"
21833#define PRIxFAST64 __PRI64_PREFIX "x"
21834#define PRIX8 "X"
21835#define PRIX16 "X"
21836#define PRIX32 "X"
21837#define PRIX64 __PRI64_PREFIX "X"
21838#define PRIXLEAST8 "X"
21839#define PRIXLEAST16 "X"
21840#define PRIXLEAST32 "X"
21841#define PRIXLEAST64 __PRI64_PREFIX "X"
21842#define PRIXFAST8 "X"
21843#define PRIXFAST16 __PRIPTR_PREFIX "X"
21844#define PRIXFAST32 __PRIPTR_PREFIX "X"
21845#define PRIXFAST64 __PRI64_PREFIX "X"
21846#define PRIdMAX __PRI64_PREFIX "d"
21847#define PRIiMAX __PRI64_PREFIX "i"
21848#define PRIoMAX __PRI64_PREFIX "o"
21849#define PRIuMAX __PRI64_PREFIX "u"
21850#define PRIxMAX __PRI64_PREFIX "x"
21851#define PRIXMAX __PRI64_PREFIX "X"
21852#define PRIdPTR __PRIPTR_PREFIX "d"
21853#define PRIiPTR __PRIPTR_PREFIX "i"
21854#define PRIoPTR __PRIPTR_PREFIX "o"
21855#define PRIuPTR __PRIPTR_PREFIX "u"
21856#define PRIxPTR __PRIPTR_PREFIX "x"
21857#define PRIXPTR __PRIPTR_PREFIX "X"
21858#define SCNd8 "hhd"
21859#define SCNd16 "hd"
21860#define SCNd32 "d"
21861#define SCNd64 __PRI64_PREFIX "d"
21862#define SCNdLEAST8 "hhd"
21863#define SCNdLEAST16 "hd"
21864#define SCNdLEAST32 "d"
21865#define SCNdLEAST64 __PRI64_PREFIX "d"
21866#define SCNdFAST8 "hhd"
21867#define SCNdFAST16 __PRIPTR_PREFIX "d"
21868#define SCNdFAST32 __PRIPTR_PREFIX "d"
21869#define SCNdFAST64 __PRI64_PREFIX "d"
21870#define SCNi8 "hhi"
21871#define SCNi16 "hi"
21872#define SCNi32 "i"
21873#define SCNi64 __PRI64_PREFIX "i"
21874#define SCNiLEAST8 "hhi"
21875#define SCNiLEAST16 "hi"
21876#define SCNiLEAST32 "i"
21877#define SCNiLEAST64 __PRI64_PREFIX "i"
21878#define SCNiFAST8 "hhi"
21879#define SCNiFAST16 __PRIPTR_PREFIX "i"
21880#define SCNiFAST32 __PRIPTR_PREFIX "i"
21881#define SCNiFAST64 __PRI64_PREFIX "i"
21882#define SCNu8 "hhu"
21883#define SCNu16 "hu"
21884#define SCNu32 "u"
21885#define SCNu64 __PRI64_PREFIX "u"
21886#define SCNuLEAST8 "hhu"
21887#define SCNuLEAST16 "hu"
21888#define SCNuLEAST32 "u"
21889#define SCNuLEAST64 __PRI64_PREFIX "u"
21890#define SCNuFAST8 "hhu"
21891#define SCNuFAST16 __PRIPTR_PREFIX "u"
21892#define SCNuFAST32 __PRIPTR_PREFIX "u"
21893#define SCNuFAST64 __PRI64_PREFIX "u"
21894#define SCNo8 "hho"
21895#define SCNo16 "ho"
21896#define SCNo32 "o"
21897#define SCNo64 __PRI64_PREFIX "o"
21898#define SCNoLEAST8 "hho"
21899#define SCNoLEAST16 "ho"
21900#define SCNoLEAST32 "o"
21901#define SCNoLEAST64 __PRI64_PREFIX "o"
21902#define SCNoFAST8 "hho"
21903#define SCNoFAST16 __PRIPTR_PREFIX "o"
21904#define SCNoFAST32 __PRIPTR_PREFIX "o"
21905#define SCNoFAST64 __PRI64_PREFIX "o"
21906#define SCNx8 "hhx"
21907#define SCNx16 "hx"
21908#define SCNx32 "x"
21909#define SCNx64 __PRI64_PREFIX "x"
21910#define SCNxLEAST8 "hhx"
21911#define SCNxLEAST16 "hx"
21912#define SCNxLEAST32 "x"
21913#define SCNxLEAST64 __PRI64_PREFIX "x"
21914#define SCNxFAST8 "hhx"
21915#define SCNxFAST16 __PRIPTR_PREFIX "x"
21916#define SCNxFAST32 __PRIPTR_PREFIX "x"
21917#define SCNxFAST64 __PRI64_PREFIX "x"
21918#define SCNdMAX __PRI64_PREFIX "d"
21919#define SCNiMAX __PRI64_PREFIX "i"
21920#define SCNoMAX __PRI64_PREFIX "o"
21921#define SCNuMAX __PRI64_PREFIX "u"
21922#define SCNxMAX __PRI64_PREFIX "x"
21923#define SCNdPTR __PRIPTR_PREFIX "d"
21924#define SCNiPTR __PRIPTR_PREFIX "i"
21925#define SCNoPTR __PRIPTR_PREFIX "o"
21926#define SCNuPTR __PRIPTR_PREFIX "u"
21927#define SCNxPTR __PRIPTR_PREFIX "x"
21928#define _STDALIGN_H
21929#define alignas _Alignas
21930#define alignof _Alignof
21931#define __alignas_is_defined 1
21932#define __alignof_is_defined 1
21933#define _UNISTD_H 1
21934#define _POSIX_VERSION 200809L
21935#define __POSIX2_THIS_VERSION 200809L
21936#define _POSIX2_VERSION __POSIX2_THIS_VERSION
21937#define _POSIX2_C_VERSION __POSIX2_THIS_VERSION
21938#define _POSIX2_C_BIND __POSIX2_THIS_VERSION
21939#define _POSIX2_C_DEV __POSIX2_THIS_VERSION
21940#define _POSIX2_SW_DEV __POSIX2_THIS_VERSION
21941#define _POSIX2_LOCALEDEF __POSIX2_THIS_VERSION
21942#define _XOPEN_VERSION 700
21943#define _XOPEN_XCU_VERSION 4
21944#define _XOPEN_XPG2 1
21945#define _XOPEN_XPG3 1
21946#define _XOPEN_XPG4 1
21947#define _XOPEN_UNIX 1
21948#define _XOPEN_ENH_I18N 1
21949#define _XOPEN_LEGACY 1
21950#define _BITS_POSIX_OPT_H 1
21951#define _POSIX_JOB_CONTROL 1
21952#define _POSIX_SAVED_IDS 1
21953#define _POSIX_PRIORITY_SCHEDULING 200809L
21954#define _POSIX_SYNCHRONIZED_IO 200809L
21955#define _POSIX_FSYNC 200809L
21956#define _POSIX_MAPPED_FILES 200809L
21957#define _POSIX_MEMLOCK 200809L
21958#define _POSIX_MEMLOCK_RANGE 200809L
21959#define _POSIX_MEMORY_PROTECTION 200809L
21960#define _POSIX_CHOWN_RESTRICTED 0
21961#define _POSIX_VDISABLE '\0'
21962#define _POSIX_NO_TRUNC 1
21963#define _XOPEN_REALTIME 1
21964#define _XOPEN_REALTIME_THREADS 1
21965#define _XOPEN_SHM 1
21966#define _POSIX_THREADS 200809L
21967#define _POSIX_REENTRANT_FUNCTIONS 1
21968#define _POSIX_THREAD_SAFE_FUNCTIONS 200809L
21969#define _POSIX_THREAD_PRIORITY_SCHEDULING 200809L
21970#define _POSIX_THREAD_ATTR_STACKSIZE 200809L
21971#define _POSIX_THREAD_ATTR_STACKADDR 200809L
21972#define _POSIX_THREAD_PRIO_INHERIT 200809L
21973#define _POSIX_THREAD_PRIO_PROTECT 200809L
21974#define _POSIX_THREAD_ROBUST_PRIO_INHERIT 200809L
21975#define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1
21976#define _POSIX_SEMAPHORES 200809L
21977#define _POSIX_REALTIME_SIGNALS 200809L
21978#define _POSIX_ASYNCHRONOUS_IO 200809L
21979#define _POSIX_ASYNC_IO 1
21980#define _LFS_ASYNCHRONOUS_IO 1
21981#define _POSIX_PRIORITIZED_IO 200809L
21982#define _LFS64_ASYNCHRONOUS_IO 1
21983#define _LFS_LARGEFILE 1
21984#define _LFS64_LARGEFILE 1
21985#define _LFS64_STDIO 1
21986#define _POSIX_SHARED_MEMORY_OBJECTS 200809L
21987#define _POSIX_CPUTIME 0
21988#define _POSIX_THREAD_CPUTIME 0
21989#define _POSIX_REGEXP 1
21990#define _POSIX_READER_WRITER_LOCKS 200809L
21991#define _POSIX_SHELL 1
21992#define _POSIX_TIMEOUTS 200809L
21993#define _POSIX_SPIN_LOCKS 200809L
21994#define _POSIX_SPAWN 200809L
21995#define _POSIX_TIMERS 200809L
21996#define _POSIX_BARRIERS 200809L
21997#define _POSIX_MESSAGE_PASSING 200809L
21998#define _POSIX_THREAD_PROCESS_SHARED 200809L
21999#define _POSIX_MONOTONIC_CLOCK 0
22000#define _POSIX_CLOCK_SELECTION 200809L
22001#define _POSIX_ADVISORY_INFO 200809L
22002#define _POSIX_IPV6 200809L
22003#define _POSIX_RAW_SOCKETS 200809L
22004#define _POSIX2_CHAR_TERM 200809L
22005#define _POSIX_SPORADIC_SERVER -1
22006#define _POSIX_THREAD_SPORADIC_SERVER -1
22007#define _POSIX_TRACE -1
22008#define _POSIX_TRACE_EVENT_FILTER -1
22009#define _POSIX_TRACE_INHERIT -1
22010#define _POSIX_TRACE_LOG -1
22011#define _POSIX_TYPED_MEMORY_OBJECTS -1
22012#define __WORDSIZE 64
22013#define __WORDSIZE_TIME64_COMPAT32 1
22014#define __SYSCALL_WORDSIZE 64
22015#define _POSIX_V7_LPBIG_OFFBIG -1
22016#define _POSIX_V6_LPBIG_OFFBIG -1
22017#define _XBS5_LPBIG_OFFBIG -1
22018#define _POSIX_V7_LP64_OFF64 1
22019#define _POSIX_V6_LP64_OFF64 1
22020#define _XBS5_LP64_OFF64 1
22021#define __ILP32_OFF32_CFLAGS "-m32"
22022#define __ILP32_OFF32_LDFLAGS "-m32"
22023#define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
22024#define __ILP32_OFFBIG_LDFLAGS "-m32"
22025#define __LP64_OFF64_CFLAGS "-m64"
22026#define __LP64_OFF64_LDFLAGS "-m64"
22027#define STDIN_FILENO 0
22028#define STDOUT_FILENO 1
22029#define STDERR_FILENO 2
22030#define __need_size_t
22031#define __need_NULL
22032#undef __need_ptrdiff_t
22033#undef __need_size_t
22034#undef __need_wchar_t
22035#undef NULL
22036#define NULL ((void *)0)
22037#undef __need_NULL
22038#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
22039#define __socklen_t_defined
22040#define R_OK 4
22041#define W_OK 2
22042#define X_OK 1
22043#define F_OK 0
22044#define L_SET SEEK_SET
22045#define L_INCR SEEK_CUR
22046#define L_XTND SEEK_END
22047#define _PC_LINK_MAX _PC_LINK_MAX
22048#define _PC_MAX_CANON _PC_MAX_CANON
22049#define _PC_MAX_INPUT _PC_MAX_INPUT
22050#define _PC_NAME_MAX _PC_NAME_MAX
22051#define _PC_PATH_MAX _PC_PATH_MAX
22052#define _PC_PIPE_BUF _PC_PIPE_BUF
22053#define _PC_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED
22054#define _PC_NO_TRUNC _PC_NO_TRUNC
22055#define _PC_VDISABLE _PC_VDISABLE
22056#define _PC_SYNC_IO _PC_SYNC_IO
22057#define _PC_ASYNC_IO _PC_ASYNC_IO
22058#define _PC_PRIO_IO _PC_PRIO_IO
22059#define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF
22060#define _PC_FILESIZEBITS _PC_FILESIZEBITS
22061#define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE
22062#define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE
22063#define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE
22064#define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN
22065#define _PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN
22066#define _PC_SYMLINK_MAX _PC_SYMLINK_MAX
22067#define _PC_2_SYMLINKS _PC_2_SYMLINKS
22068#define _SC_ARG_MAX _SC_ARG_MAX
22069#define _SC_CHILD_MAX _SC_CHILD_MAX
22070#define _SC_CLK_TCK _SC_CLK_TCK
22071#define _SC_NGROUPS_MAX _SC_NGROUPS_MAX
22072#define _SC_OPEN_MAX _SC_OPEN_MAX
22073#define _SC_STREAM_MAX _SC_STREAM_MAX
22074#define _SC_TZNAME_MAX _SC_TZNAME_MAX
22075#define _SC_JOB_CONTROL _SC_JOB_CONTROL
22076#define _SC_SAVED_IDS _SC_SAVED_IDS
22077#define _SC_REALTIME_SIGNALS _SC_REALTIME_SIGNALS
22078#define _SC_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING
22079#define _SC_TIMERS _SC_TIMERS
22080#define _SC_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO
22081#define _SC_PRIORITIZED_IO _SC_PRIORITIZED_IO
22082#define _SC_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO
22083#define _SC_FSYNC _SC_FSYNC
22084#define _SC_MAPPED_FILES _SC_MAPPED_FILES
22085#define _SC_MEMLOCK _SC_MEMLOCK
22086#define _SC_MEMLOCK_RANGE _SC_MEMLOCK_RANGE
22087#define _SC_MEMORY_PROTECTION _SC_MEMORY_PROTECTION
22088#define _SC_MESSAGE_PASSING _SC_MESSAGE_PASSING
22089#define _SC_SEMAPHORES _SC_SEMAPHORES
22090#define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS
22091#define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX
22092#define _SC_AIO_MAX _SC_AIO_MAX
22093#define _SC_AIO_PRIO_DELTA_MAX _SC_AIO_PRIO_DELTA_MAX
22094#define _SC_DELAYTIMER_MAX _SC_DELAYTIMER_MAX
22095#define _SC_MQ_OPEN_MAX _SC_MQ_OPEN_MAX
22096#define _SC_MQ_PRIO_MAX _SC_MQ_PRIO_MAX
22097#define _SC_VERSION _SC_VERSION
22098#define _SC_PAGESIZE _SC_PAGESIZE
22099#define _SC_PAGE_SIZE _SC_PAGESIZE
22100#define _SC_RTSIG_MAX _SC_RTSIG_MAX
22101#define _SC_SEM_NSEMS_MAX _SC_SEM_NSEMS_MAX
22102#define _SC_SEM_VALUE_MAX _SC_SEM_VALUE_MAX
22103#define _SC_SIGQUEUE_MAX _SC_SIGQUEUE_MAX
22104#define _SC_TIMER_MAX _SC_TIMER_MAX
22105#define _SC_BC_BASE_MAX _SC_BC_BASE_MAX
22106#define _SC_BC_DIM_MAX _SC_BC_DIM_MAX
22107#define _SC_BC_SCALE_MAX _SC_BC_SCALE_MAX
22108#define _SC_BC_STRING_MAX _SC_BC_STRING_MAX
22109#define _SC_COLL_WEIGHTS_MAX _SC_COLL_WEIGHTS_MAX
22110#define _SC_EQUIV_CLASS_MAX _SC_EQUIV_CLASS_MAX
22111#define _SC_EXPR_NEST_MAX _SC_EXPR_NEST_MAX
22112#define _SC_LINE_MAX _SC_LINE_MAX
22113#define _SC_RE_DUP_MAX _SC_RE_DUP_MAX
22114#define _SC_CHARCLASS_NAME_MAX _SC_CHARCLASS_NAME_MAX
22115#define _SC_2_VERSION _SC_2_VERSION
22116#define _SC_2_C_BIND _SC_2_C_BIND
22117#define _SC_2_C_DEV _SC_2_C_DEV
22118#define _SC_2_FORT_DEV _SC_2_FORT_DEV
22119#define _SC_2_FORT_RUN _SC_2_FORT_RUN
22120#define _SC_2_SW_DEV _SC_2_SW_DEV
22121#define _SC_2_LOCALEDEF _SC_2_LOCALEDEF
22122#define _SC_PII _SC_PII
22123#define _SC_PII_XTI _SC_PII_XTI
22124#define _SC_PII_SOCKET _SC_PII_SOCKET
22125#define _SC_PII_INTERNET _SC_PII_INTERNET
22126#define _SC_PII_OSI _SC_PII_OSI
22127#define _SC_POLL _SC_POLL
22128#define _SC_SELECT _SC_SELECT
22129#define _SC_UIO_MAXIOV _SC_UIO_MAXIOV
22130#define _SC_IOV_MAX _SC_IOV_MAX
22131#define _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_STREAM
22132#define _SC_PII_INTERNET_DGRAM _SC_PII_INTERNET_DGRAM
22133#define _SC_PII_OSI_COTS _SC_PII_OSI_COTS
22134#define _SC_PII_OSI_CLTS _SC_PII_OSI_CLTS
22135#define _SC_PII_OSI_M _SC_PII_OSI_M
22136#define _SC_T_IOV_MAX _SC_T_IOV_MAX
22137#define _SC_THREADS _SC_THREADS
22138#define _SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS
22139#define _SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX
22140#define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX
22141#define _SC_LOGIN_NAME_MAX _SC_LOGIN_NAME_MAX
22142#define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX
22143#define _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_DESTRUCTOR_ITERATIONS
22144#define _SC_THREAD_KEYS_MAX _SC_THREAD_KEYS_MAX
22145#define _SC_THREAD_STACK_MIN _SC_THREAD_STACK_MIN
22146#define _SC_THREAD_THREADS_MAX _SC_THREAD_THREADS_MAX
22147#define _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR
22148#define _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE
22149#define _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING
22150#define _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT
22151#define _SC_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT
22152#define _SC_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED
22153#define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF
22154#define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN
22155#define _SC_PHYS_PAGES _SC_PHYS_PAGES
22156#define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES
22157#define _SC_ATEXIT_MAX _SC_ATEXIT_MAX
22158#define _SC_PASS_MAX _SC_PASS_MAX
22159#define _SC_XOPEN_VERSION _SC_XOPEN_VERSION
22160#define _SC_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION
22161#define _SC_XOPEN_UNIX _SC_XOPEN_UNIX
22162#define _SC_XOPEN_CRYPT _SC_XOPEN_CRYPT
22163#define _SC_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N
22164#define _SC_XOPEN_SHM _SC_XOPEN_SHM
22165#define _SC_2_CHAR_TERM _SC_2_CHAR_TERM
22166#define _SC_2_C_VERSION _SC_2_C_VERSION
22167#define _SC_2_UPE _SC_2_UPE
22168#define _SC_XOPEN_XPG2 _SC_XOPEN_XPG2
22169#define _SC_XOPEN_XPG3 _SC_XOPEN_XPG3
22170#define _SC_XOPEN_XPG4 _SC_XOPEN_XPG4
22171#define _SC_CHAR_BIT _SC_CHAR_BIT
22172#define _SC_CHAR_MAX _SC_CHAR_MAX
22173#define _SC_CHAR_MIN _SC_CHAR_MIN
22174#define _SC_INT_MAX _SC_INT_MAX
22175#define _SC_INT_MIN _SC_INT_MIN
22176#define _SC_LONG_BIT _SC_LONG_BIT
22177#define _SC_WORD_BIT _SC_WORD_BIT
22178#define _SC_MB_LEN_MAX _SC_MB_LEN_MAX
22179#define _SC_NZERO _SC_NZERO
22180#define _SC_SSIZE_MAX _SC_SSIZE_MAX
22181#define _SC_SCHAR_MAX _SC_SCHAR_MAX
22182#define _SC_SCHAR_MIN _SC_SCHAR_MIN
22183#define _SC_SHRT_MAX _SC_SHRT_MAX
22184#define _SC_SHRT_MIN _SC_SHRT_MIN
22185#define _SC_UCHAR_MAX _SC_UCHAR_MAX
22186#define _SC_UINT_MAX _SC_UINT_MAX
22187#define _SC_ULONG_MAX _SC_ULONG_MAX
22188#define _SC_USHRT_MAX _SC_USHRT_MAX
22189#define _SC_NL_ARGMAX _SC_NL_ARGMAX
22190#define _SC_NL_LANGMAX _SC_NL_LANGMAX
22191#define _SC_NL_MSGMAX _SC_NL_MSGMAX
22192#define _SC_NL_NMAX _SC_NL_NMAX
22193#define _SC_NL_SETMAX _SC_NL_SETMAX
22194#define _SC_NL_TEXTMAX _SC_NL_TEXTMAX
22195#define _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF32
22196#define _SC_XBS5_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG
22197#define _SC_XBS5_LP64_OFF64 _SC_XBS5_LP64_OFF64
22198#define _SC_XBS5_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG
22199#define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY
22200#define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME
22201#define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS
22202#define _SC_ADVISORY_INFO _SC_ADVISORY_INFO
22203#define _SC_BARRIERS _SC_BARRIERS
22204#define _SC_BASE _SC_BASE
22205#define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT
22206#define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R
22207#define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION
22208#define _SC_CPUTIME _SC_CPUTIME
22209#define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME
22210#define _SC_DEVICE_IO _SC_DEVICE_IO
22211#define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC
22212#define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R
22213#define _SC_FD_MGMT _SC_FD_MGMT
22214#define _SC_FIFO _SC_FIFO
22215#define _SC_PIPE _SC_PIPE
22216#define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES
22217#define _SC_FILE_LOCKING _SC_FILE_LOCKING
22218#define _SC_FILE_SYSTEM _SC_FILE_SYSTEM
22219#define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK
22220#define _SC_MULTI_PROCESS _SC_MULTI_PROCESS
22221#define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS
22222#define _SC_NETWORKING _SC_NETWORKING
22223#define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS
22224#define _SC_SPIN_LOCKS _SC_SPIN_LOCKS
22225#define _SC_REGEXP _SC_REGEXP
22226#define _SC_REGEX_VERSION _SC_REGEX_VERSION
22227#define _SC_SHELL _SC_SHELL
22228#define _SC_SIGNALS _SC_SIGNALS
22229#define _SC_SPAWN _SC_SPAWN
22230#define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER
22231#define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER
22232#define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE
22233#define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R
22234#define _SC_TIMEOUTS _SC_TIMEOUTS
22235#define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS
22236#define _SC_USER_GROUPS _SC_USER_GROUPS
22237#define _SC_USER_GROUPS_R _SC_USER_GROUPS_R
22238#define _SC_2_PBS _SC_2_PBS
22239#define _SC_2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING
22240#define _SC_2_PBS_LOCATE _SC_2_PBS_LOCATE
22241#define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE
22242#define _SC_2_PBS_TRACK _SC_2_PBS_TRACK
22243#define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX
22244#define _SC_STREAMS _SC_STREAMS
22245#define _SC_2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT
22246#define _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32
22247#define _SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG
22248#define _SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64
22249#define _SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG
22250#define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX
22251#define _SC_TRACE _SC_TRACE
22252#define _SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER
22253#define _SC_TRACE_INHERIT _SC_TRACE_INHERIT
22254#define _SC_TRACE_LOG _SC_TRACE_LOG
22255#define _SC_LEVEL1_ICACHE_SIZE _SC_LEVEL1_ICACHE_SIZE
22256#define _SC_LEVEL1_ICACHE_ASSOC _SC_LEVEL1_ICACHE_ASSOC
22257#define _SC_LEVEL1_ICACHE_LINESIZE _SC_LEVEL1_ICACHE_LINESIZE
22258#define _SC_LEVEL1_DCACHE_SIZE _SC_LEVEL1_DCACHE_SIZE
22259#define _SC_LEVEL1_DCACHE_ASSOC _SC_LEVEL1_DCACHE_ASSOC
22260#define _SC_LEVEL1_DCACHE_LINESIZE _SC_LEVEL1_DCACHE_LINESIZE
22261#define _SC_LEVEL2_CACHE_SIZE _SC_LEVEL2_CACHE_SIZE
22262#define _SC_LEVEL2_CACHE_ASSOC _SC_LEVEL2_CACHE_ASSOC
22263#define _SC_LEVEL2_CACHE_LINESIZE _SC_LEVEL2_CACHE_LINESIZE
22264#define _SC_LEVEL3_CACHE_SIZE _SC_LEVEL3_CACHE_SIZE
22265#define _SC_LEVEL3_CACHE_ASSOC _SC_LEVEL3_CACHE_ASSOC
22266#define _SC_LEVEL3_CACHE_LINESIZE _SC_LEVEL3_CACHE_LINESIZE
22267#define _SC_LEVEL4_CACHE_SIZE _SC_LEVEL4_CACHE_SIZE
22268#define _SC_LEVEL4_CACHE_ASSOC _SC_LEVEL4_CACHE_ASSOC
22269#define _SC_LEVEL4_CACHE_LINESIZE _SC_LEVEL4_CACHE_LINESIZE
22270#define _SC_IPV6 _SC_IPV6
22271#define _SC_RAW_SOCKETS _SC_RAW_SOCKETS
22272#define _SC_V7_ILP32_OFF32 _SC_V7_ILP32_OFF32
22273#define _SC_V7_ILP32_OFFBIG _SC_V7_ILP32_OFFBIG
22274#define _SC_V7_LP64_OFF64 _SC_V7_LP64_OFF64
22275#define _SC_V7_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG
22276#define _SC_SS_REPL_MAX _SC_SS_REPL_MAX
22277#define _SC_TRACE_EVENT_NAME_MAX _SC_TRACE_EVENT_NAME_MAX
22278#define _SC_TRACE_NAME_MAX _SC_TRACE_NAME_MAX
22279#define _SC_TRACE_SYS_MAX _SC_TRACE_SYS_MAX
22280#define _SC_TRACE_USER_EVENT_MAX _SC_TRACE_USER_EVENT_MAX
22281#define _SC_XOPEN_STREAMS _SC_XOPEN_STREAMS
22282#define _SC_THREAD_ROBUST_PRIO_INHERIT _SC_THREAD_ROBUST_PRIO_INHERIT
22283#define _SC_THREAD_ROBUST_PRIO_PROTECT _SC_THREAD_ROBUST_PRIO_PROTECT
22284#define _SC_MINSIGSTKSZ _SC_MINSIGSTKSZ
22285#define _SC_SIGSTKSZ _SC_SIGSTKSZ
22286#define _CS_PATH _CS_PATH
22287#define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS
22288#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS
22289#define _CS_GNU_LIBC_VERSION _CS_GNU_LIBC_VERSION
22290#define _CS_GNU_LIBPTHREAD_VERSION _CS_GNU_LIBPTHREAD_VERSION
22291#define _CS_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS
22292#define _CS_POSIX_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS
22293#define _CS_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS
22294#define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS
22295#define _CS_LFS_CFLAGS _CS_LFS_CFLAGS
22296#define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS
22297#define _CS_LFS_LIBS _CS_LFS_LIBS
22298#define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS
22299#define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS
22300#define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS
22301#define _CS_LFS64_LIBS _CS_LFS64_LIBS
22302#define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS
22303#define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS
22304#define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS
22305#define _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS
22306#define _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS
22307#define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS
22308#define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS
22309#define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS
22310#define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS
22311#define _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS
22312#define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS
22313#define _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS
22314#define _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS
22315#define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS
22316#define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS
22317#define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS
22318#define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS
22319#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS
22320#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS
22321#define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LIBS
22322#define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS
22323#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
22324#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
22325#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LIBS
22326#define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS
22327#define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS
22328#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS
22329#define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LIBS
22330#define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS
22331#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
22332#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
22333#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
22334#define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
22335#define _CS_POSIX_V7_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_CFLAGS
22336#define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS
22337#define _CS_POSIX_V7_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFF32_LIBS
22338#define _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS
22339#define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS
22340#define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS
22341#define _CS_POSIX_V7_ILP32_OFFBIG_LIBS _CS_POSIX_V7_ILP32_OFFBIG_LIBS
22342#define _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS
22343#define _CS_POSIX_V7_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_CFLAGS
22344#define _CS_POSIX_V7_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS
22345#define _CS_POSIX_V7_LP64_OFF64_LIBS _CS_POSIX_V7_LP64_OFF64_LIBS
22346#define _CS_POSIX_V7_LP64_OFF64_LINTFLAGS _CS_POSIX_V7_LP64_OFF64_LINTFLAGS
22347#define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS
22348#define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS
22349#define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS
22350#define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS
22351#define _CS_V6_ENV _CS_V6_ENV
22352#define _CS_V7_ENV _CS_V7_ENV
22353#define _GETOPT_POSIX_H 1
22354#define _GETOPT_CORE_H 1
22355#define F_ULOCK 0
22356#define F_LOCK 1
22357#define F_TLOCK 2
22358#define F_TEST 3
22359#define TEMP_FAILURE_RETRY(expression) (__extension__ ({ long int __result; do __result = (long int) (expression); while (__result == -1L && errno == EINTR); __result; }))
22360#define _LINUX_CLOSE_RANGE_H
22361#define CLOSE_RANGE_UNSHARE (1U << 1)
22362#define CLOSE_RANGE_CLOEXEC (1U << 2)
22363#define RBIMPL_DLLEXPORT_H
22364#undef RUBY_EXTERN
22365#define RUBY_EXTERN extern
22366#define MJIT_FUNC_EXPORTED RUBY_FUNC_EXPORTED
22367#define MJIT_SYMBOL_EXPORT_BEGIN RUBY_SYMBOL_EXPORT_BEGIN
22368#define MJIT_SYMBOL_EXPORT_END RUBY_SYMBOL_EXPORT_END
22369#define MJIT_STATIC static
22370#define RBIMPL_SYMBOL_EXPORT_BEGIN() RUBY_SYMBOL_EXPORT_BEGIN
22371#define RBIMPL_SYMBOL_EXPORT_END() RUBY_SYMBOL_EXPORT_END
22372#define RBIMPL_XMALLOC_H
22373#define RBIMPL_ATTR_ALLOC_SIZE_H
22374#define RBIMPL_HAS_ATTRIBUTE_H
22375#define RBIMPL_HAVE___HAS_ATTRIBUTE 1
22376#define RBIMPL_HAS_ATTRIBUTE(_) __has_attribute(_)
22377#define RBIMPL_ATTR_ALLOC_SIZE(tuple) __attribute__((__alloc_size__ tuple))
22378#define RBIMPL_ATTR_NODISCARD_H
22379#define RBIMPL_HAS_C_ATTRIBUTE_H
22380#define RBIMPL_HAS_C_ATTRIBUTE(_) __has_c_attribute(_)
22381#define RBIMPL_HAS_CPP_ATTRIBUTE_H
22382#define RBIMPL_HAS_CPP_ATTRIBUTE0(_) __has_cpp_attribute(_)
22383#define RBIMPL_HAS_CPP_ATTRIBUTE(_) 0
22384#define RBIMPL_ATTR_NODISCARD() [[nodiscard]]
22385#define RBIMPL_ATTR_NOEXCEPT_H
22386#define RBIMPL_HAS_FEATURE_H
22387#define RBIMPL_HAS_FEATURE(_) 0
22388#define RBIMPL_ATTR_NOEXCEPT(_)
22389#define RBIMPL_ATTR_RESTRICT_H
22390#define RBIMPL_ATTR_RESTRICT() __attribute__((__malloc__))
22391#define RBIMPL_ATTR_RETURNS_NONNULL_H
22392#define RBIMPL_ATTR_RETURNS_NONNULL() __attribute__((__returns_nonnull__))
22393#define USE_GC_MALLOC_OBJ_INFO_DETAILS 0
22394#define xmalloc ruby_xmalloc
22395#define xmalloc2 ruby_xmalloc2
22396#define xcalloc ruby_xcalloc
22397#define xrealloc ruby_xrealloc
22398#define xrealloc2 ruby_xrealloc2
22399#define xfree ruby_xfree
22400#pragma GCC visibility push(default)
22401#pragma GCC visibility pop
22402#define RUBY_BACKWARD2_ASSUME_H
22403#define RBIMPL_ASSUME_H
22404#define RBIMPL_CAST_H
22405#define RBIMPL_HAS_WARNING_H
22406#define RBIMPL_HAS_WARNING(_) 0
22407#define RBIMPL_WARNING_PUSH_H
22408#define RBIMPL_WARNING_PRAGMA0(x) _Pragma(#x)
22409#define RBIMPL_WARNING_PRAGMA1(x) RBIMPL_WARNING_PRAGMA0(GCC diagnostic x)
22410#define RBIMPL_WARNING_PRAGMA2(x,y) RBIMPL_WARNING_PRAGMA1(x #y)
22411#define RBIMPL_WARNING_PUSH() RBIMPL_WARNING_PRAGMA1(push)
22412#define RBIMPL_WARNING_POP() RBIMPL_WARNING_PRAGMA1(pop)
22413#define RBIMPL_WARNING_ERROR(flag) RBIMPL_WARNING_PRAGMA2(error, flag)
22414#define RBIMPL_WARNING_IGNORED(flag) RBIMPL_WARNING_PRAGMA2(ignored, flag)
22415#define RBIMPL_CAST(expr) (expr)
22416#define RBIMPL_HAS_BUILTIN_H
22417#define RBIMPL_HAVE___HAS_BUILTIN 1
22418#define RBIMPL_HAS_BUILTIN(_) __has_builtin(_)
22419#define RBIMPL_UNREACHABLE_RETURN(_) __builtin_unreachable()
22420#define RBIMPL_UNREACHABLE __builtin_unreachable
22421#define RBIMPL_ASSUME(_) (RB_LIKELY(!!(_)) ? RBIMPL_CAST((void)0) : RBIMPL_UNREACHABLE())
22422#define ASSUME RBIMPL_ASSUME
22423#define UNREACHABLE RBIMPL_UNREACHABLE()
22424#define UNREACHABLE_RETURN RBIMPL_UNREACHABLE_RETURN
22425#define RB_LIKELY(x) (__builtin_expect(!!(x), 1))
22426#define RB_UNLIKELY(x) (__builtin_expect(!!(x), 0))
22427#define RUBY_BACKWARD2_ATTRIBUTES_H
22428#define RBIMPL_ATTR_CONST_H
22429#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_H
22430#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE(_) (RBIMPL_HAS_DECLSPEC_ATTRIBUTE_ ## _)
22431#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_align RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0)
22432#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_deprecated RBIMPL_COMPILER_SINCE(MSVC,13, 0, 0)
22433#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_dllexport RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0)
22434#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_dllimport RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0)
22435#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_empty_bases RBIMPL_COMPILER_SINCE(MSVC,19, 0, 23918)
22436#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_noalias RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0)
22437#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_noinline RBIMPL_COMPILER_SINCE(MSVC,13, 0, 0)
22438#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_noreturn RBIMPL_COMPILER_SINCE(MSVC,11, 0, 0)
22439#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_nothrow RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0)
22440#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_restrict RBIMPL_COMPILER_SINCE(MSVC,14, 0, 0)
22441#undef RBIMPL_HAS_DECLSPEC_ATTRIBUTE_nothrow
22442#define RBIMPL_ATTR_CONST() __attribute__((__const__))
22443#define RBIMPL_ATTR_CONST_UNLESS_DEBUG() RBIMPL_ATTR_CONST()
22444#define RBIMPL_ATTR_DEPRECATED_H
22445#define RBIMPL_HAS_EXTENSION_H
22446#define RBIMPL_HAS_EXTENSION(_) RBIMPL_HAS_FEATURE(_)
22447#define RBIMPL_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg))
22448#define RBIMPL_ATTR_DEPRECATED_EXT(msg)
22449#define RBIMPL_ATTR_ERROR_H
22450#define RBIMPL_ATTR_ERROR(msg) __attribute__((__error__ msg))
22451#define RBIMPL_ATTR_FORCEINLINE_H
22452#define RBIMPL_ATTR_FORCEINLINE() __attribute__((__always_inline__)) inline
22453#define RBIMPL_ATTR_FORMAT_H
22454#define RBIMPL_ATTR_FORMAT(x,y,z) __attribute__((__format__(x, y, z)))
22455#define RBIMPL_PRINTF_FORMAT __printf__
22456#define RBIMPL_ATTR_MAYBE_UNUSED_H
22457#define RBIMPL_ATTR_MAYBE_UNUSED() [[maybe_unused]]
22458#define RBIMPL_ATTR_NOINLINE_H
22459#define RBIMPL_ATTR_NOINLINE() __attribute__((__noinline__))
22460#define RBIMPL_ATTR_NONNULL_H
22461#define RBIMPL_ATTR_NONNULL(list) __attribute__((__nonnull__ list))
22462#define RBIMPL_NONNULL_ARG(arg) RBIMPL_ASSERT_NOTHING
22463#define RBIMPL_ATTR_NORETURN_H
22464#define RBIMPL_ATTR_NORETURN() __attribute__((__noreturn__))
22465#define RBIMPL_ATTR_PURE_H
22466#define RUBY_ASSERT_H
22467#define RBIMPL_RUBY_DEBUG 0
22468#define RBIMPL_NDEBUG 0
22469#undef RUBY_DEBUG
22470#undef RUBY_NDEBUG
22471#undef NDEBUG
22472#define RUBY_DEBUG 0
22473#define RUBY_NDEBUG 1
22474#define NDEBUG
22475#undef RBIMPL_NDEBUG
22476#undef RBIMPL_RUBY_DEBUG
22477#define RBIMPL_ASSERT_NOTHING RBIMPL_CAST((void)0)
22478#pragma GCC visibility push(default)
22479#pragma GCC visibility pop
22480#define RBIMPL_ASSERT_FUNC RUBY_FUNCTION_NAME_STRING
22481#define RUBY_ASSERT_FAIL(mesg) rb_assert_failure(__FILE__, __LINE__, RBIMPL_ASSERT_FUNC, mesg)
22482#define RUBY_ASSERT_MESG(expr,mesg) (RB_LIKELY(expr) ? RBIMPL_ASSERT_NOTHING : RUBY_ASSERT_FAIL(mesg))
22483#define RUBY_ASSERT_ALWAYS(expr) RUBY_ASSERT_MESG((expr), #expr)
22484#define RUBY_ASSERT(expr) RBIMPL_ASSERT_NOTHING
22485#define RUBY_ASSERT_NDEBUG(expr) RBIMPL_ASSERT_NOTHING
22486#define RUBY_ASSERT_MESG_WHEN(cond,expr,mesg) ((cond) ? RUBY_ASSERT_MESG((expr), (mesg)) : RBIMPL_ASSERT_NOTHING)
22487#define RUBY_ASSERT_WHEN(cond,expr) RUBY_ASSERT_MESG_WHEN((cond), (expr), #expr)
22488#define RBIMPL_ASSERT_OR_ASSUME(expr) RBIMPL_ASSERT_NOTHING
22489#define RBIMPL_ATTR_PURE() __attribute__((__pure__))
22490#define RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_PURE()
22491#define RBIMPL_ATTR_WARNING_H
22492#define RBIMPL_ATTR_WARNING(msg) __attribute__((__warning__ msg))
22493#undef CONSTFUNC
22494#define CONSTFUNC(x) RBIMPL_ATTR_CONST() x
22495#undef PUREFUNC
22496#define PUREFUNC(x) RBIMPL_ATTR_PURE() x
22497#undef DEPRECATED
22498#define DEPRECATED(x) RBIMPL_ATTR_DEPRECATED(("")) x
22499#undef DEPRECATED_BY
22500#define DEPRECATED_BY(n,x) RBIMPL_ATTR_DEPRECATED(("by: " #n)) x
22501#undef DEPRECATED_TYPE
22502#define DEPRECATED_TYPE(mesg,decl) _Pragma("message \"DEPRECATED_TYPE is deprecated\""); decl RBIMPL_ATTR_DEPRECATED(mseg)
22503#undef RUBY_CXX_DEPRECATED
22504#define RUBY_CXX_DEPRECATED(mseg) RBIMPL_ATTR_DEPRECATED((mseg))
22505#undef NOINLINE
22506#define NOINLINE(x) RBIMPL_ATTR_NOINLINE() x
22507#undef ERRORFUNC
22508#define ERRORFUNC(mesg,x) RBIMPL_ATTR_ERROR(mesg) x
22509#define HAVE_ATTRIBUTE_ERRORFUNC 1
22510#undef WARNINGFUNC
22511#define WARNINGFUNC(mesg,x) RBIMPL_ATTR_WARNING(mesg) x
22512#define HAVE_ATTRIBUTE_WARNINGFUNC 1
22513#undef COLDFUNC
22514#define PRINTF_ARGS(decl,string_index,first_to_check) RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, (string_index), (first_to_check)) decl
22515#undef RUBY_ATTR_ALLOC_SIZE
22516#define RUBY_ATTR_ALLOC_SIZE RBIMPL_ATTR_ALLOC_SIZE
22517#undef RUBY_ATTR_MALLOC
22518#define RUBY_ATTR_MALLOC RBIMPL_ATTR_RESTRICT()
22519#undef RUBY_ATTR_RETURNS_NONNULL
22520#define RUBY_ATTR_RETURNS_NONNULL RBIMPL_ATTR_RETURNS_NONNULL()
22521#define RUBY_ALIAS_FUNCTION(prot,name,args) RUBY_ALIAS_FUNCTION_TYPE(VALUE, prot, name, args)
22522#undef RUBY_FUNC_NONNULL
22523#define RUBY_FUNC_NONNULL(n,x) RBIMPL_ATTR_NONNULL(n) x
22524#undef NORETURN
22525#define NORETURN(x) RBIMPL_ATTR_NORETURN() x
22526#define NORETURN_STYLE_NEW
22527#define PACKED_STRUCT_UNALIGNED(x) PACKED_STRUCT(x)
22528#undef RB_UNUSED_VAR
22529#define RB_UNUSED_VAR(x) x RBIMPL_ATTR_MAYBE_UNUSED()
22530#define RUBY_BACKWARD2_BOOL_H
22531#define RBIMPL_STDBOOL_H
22532#define _STDBOOL_H
22533#define bool _Bool
22534#define true 1
22535#define false 0
22536#define __bool_true_false_are_defined 1
22537#define FALSE false
22538#define TRUE true
22539#define RUBY_BACKWARD2_LONG_LONG_H
22540#define HAVE_TRUE_LONG_LONG 1
22541#define LONG_LONG long long
22542#define RUBY_BACKWARD2_STDALIGN_H
22543#define RBIMPL_STDALIGN_H
22544#define RBIMPL_ALIGNAS(_) __attribute__((__aligned__(_)))
22545#define RBIMPL_ALIGNOF(T) RB_GNUC_EXTENSION(_Alignof(T))
22546#undef RUBY_ALIGNAS
22547#undef RUBY_ALIGNOF
22548#define RUBY_ALIGNAS RBIMPL_ALIGNAS
22549#define RUBY_ALIGNOF RBIMPL_ALIGNOF
22550#define RUBY_BACKWARD2_STDARG_H
22551#undef _
22552#define _(args) args
22553#undef __
22554#define __(args) args
22555#define ANYARGS
22556#define RBIMPL_DOSISH_H
22557#define PATH_SEP ":"
22558#define PATH_SEP_CHAR PATH_SEP[0]
22559#define PATH_ENV "PATH"
22560#define CASEFOLD_FILESYSTEM 0
22561#define RUBY_MISSING_H 1
22562#define _MATH_H 1
22563#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
22564#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
22565#undef __GLIBC_USE_LIB_EXT2
22566#define __GLIBC_USE_LIB_EXT2 1
22567#undef __GLIBC_USE_IEC_60559_BFP_EXT
22568#define __GLIBC_USE_IEC_60559_BFP_EXT 1
22569#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
22570#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
22571#undef __GLIBC_USE_IEC_60559_EXT
22572#define __GLIBC_USE_IEC_60559_EXT 1
22573#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
22574#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
22575#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
22576#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
22577#undef __GLIBC_USE_IEC_60559_TYPES_EXT
22578#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
22579#define _BITS_LIBM_SIMD_DECL_STUBS_H 1
22580#define __DECL_SIMD_cos
22581#define __DECL_SIMD_cosf
22582#define __DECL_SIMD_cosl
22583#define __DECL_SIMD_cosf16
22584#define __DECL_SIMD_cosf32
22585#define __DECL_SIMD_cosf64
22586#define __DECL_SIMD_cosf128
22587#define __DECL_SIMD_cosf32x
22588#define __DECL_SIMD_cosf64x
22589#define __DECL_SIMD_cosf128x
22590#define __DECL_SIMD_sin
22591#define __DECL_SIMD_sinf
22592#define __DECL_SIMD_sinl
22593#define __DECL_SIMD_sinf16
22594#define __DECL_SIMD_sinf32
22595#define __DECL_SIMD_sinf64
22596#define __DECL_SIMD_sinf128
22597#define __DECL_SIMD_sinf32x
22598#define __DECL_SIMD_sinf64x
22599#define __DECL_SIMD_sinf128x
22600#define __DECL_SIMD_sincos
22601#define __DECL_SIMD_sincosf
22602#define __DECL_SIMD_sincosl
22603#define __DECL_SIMD_sincosf16
22604#define __DECL_SIMD_sincosf32
22605#define __DECL_SIMD_sincosf64
22606#define __DECL_SIMD_sincosf128
22607#define __DECL_SIMD_sincosf32x
22608#define __DECL_SIMD_sincosf64x
22609#define __DECL_SIMD_sincosf128x
22610#define __DECL_SIMD_log
22611#define __DECL_SIMD_logf
22612#define __DECL_SIMD_logl
22613#define __DECL_SIMD_logf16
22614#define __DECL_SIMD_logf32
22615#define __DECL_SIMD_logf64
22616#define __DECL_SIMD_logf128
22617#define __DECL_SIMD_logf32x
22618#define __DECL_SIMD_logf64x
22619#define __DECL_SIMD_logf128x
22620#define __DECL_SIMD_exp
22621#define __DECL_SIMD_expf
22622#define __DECL_SIMD_expl
22623#define __DECL_SIMD_expf16
22624#define __DECL_SIMD_expf32
22625#define __DECL_SIMD_expf64
22626#define __DECL_SIMD_expf128
22627#define __DECL_SIMD_expf32x
22628#define __DECL_SIMD_expf64x
22629#define __DECL_SIMD_expf128x
22630#define __DECL_SIMD_pow
22631#define __DECL_SIMD_powf
22632#define __DECL_SIMD_powl
22633#define __DECL_SIMD_powf16
22634#define __DECL_SIMD_powf32
22635#define __DECL_SIMD_powf64
22636#define __DECL_SIMD_powf128
22637#define __DECL_SIMD_powf32x
22638#define __DECL_SIMD_powf64x
22639#define __DECL_SIMD_powf128x
22640#define __DECL_SIMD_acos
22641#define __DECL_SIMD_acosf
22642#define __DECL_SIMD_acosl
22643#define __DECL_SIMD_acosf16
22644#define __DECL_SIMD_acosf32
22645#define __DECL_SIMD_acosf64
22646#define __DECL_SIMD_acosf128
22647#define __DECL_SIMD_acosf32x
22648#define __DECL_SIMD_acosf64x
22649#define __DECL_SIMD_acosf128x
22650#define __DECL_SIMD_atan
22651#define __DECL_SIMD_atanf
22652#define __DECL_SIMD_atanl
22653#define __DECL_SIMD_atanf16
22654#define __DECL_SIMD_atanf32
22655#define __DECL_SIMD_atanf64
22656#define __DECL_SIMD_atanf128
22657#define __DECL_SIMD_atanf32x
22658#define __DECL_SIMD_atanf64x
22659#define __DECL_SIMD_atanf128x
22660#define __DECL_SIMD_asin
22661#define __DECL_SIMD_asinf
22662#define __DECL_SIMD_asinl
22663#define __DECL_SIMD_asinf16
22664#define __DECL_SIMD_asinf32
22665#define __DECL_SIMD_asinf64
22666#define __DECL_SIMD_asinf128
22667#define __DECL_SIMD_asinf32x
22668#define __DECL_SIMD_asinf64x
22669#define __DECL_SIMD_asinf128x
22670#define __DECL_SIMD_hypot
22671#define __DECL_SIMD_hypotf
22672#define __DECL_SIMD_hypotl
22673#define __DECL_SIMD_hypotf16
22674#define __DECL_SIMD_hypotf32
22675#define __DECL_SIMD_hypotf64
22676#define __DECL_SIMD_hypotf128
22677#define __DECL_SIMD_hypotf32x
22678#define __DECL_SIMD_hypotf64x
22679#define __DECL_SIMD_hypotf128x
22680#define __DECL_SIMD_exp2
22681#define __DECL_SIMD_exp2f
22682#define __DECL_SIMD_exp2l
22683#define __DECL_SIMD_exp2f16
22684#define __DECL_SIMD_exp2f32
22685#define __DECL_SIMD_exp2f64
22686#define __DECL_SIMD_exp2f128
22687#define __DECL_SIMD_exp2f32x
22688#define __DECL_SIMD_exp2f64x
22689#define __DECL_SIMD_exp2f128x
22690#define __DECL_SIMD_exp10
22691#define __DECL_SIMD_exp10f
22692#define __DECL_SIMD_exp10l
22693#define __DECL_SIMD_exp10f16
22694#define __DECL_SIMD_exp10f32
22695#define __DECL_SIMD_exp10f64
22696#define __DECL_SIMD_exp10f128
22697#define __DECL_SIMD_exp10f32x
22698#define __DECL_SIMD_exp10f64x
22699#define __DECL_SIMD_exp10f128x
22700#define __DECL_SIMD_cosh
22701#define __DECL_SIMD_coshf
22702#define __DECL_SIMD_coshl
22703#define __DECL_SIMD_coshf16
22704#define __DECL_SIMD_coshf32
22705#define __DECL_SIMD_coshf64
22706#define __DECL_SIMD_coshf128
22707#define __DECL_SIMD_coshf32x
22708#define __DECL_SIMD_coshf64x
22709#define __DECL_SIMD_coshf128x
22710#define __DECL_SIMD_expm1
22711#define __DECL_SIMD_expm1f
22712#define __DECL_SIMD_expm1l
22713#define __DECL_SIMD_expm1f16
22714#define __DECL_SIMD_expm1f32
22715#define __DECL_SIMD_expm1f64
22716#define __DECL_SIMD_expm1f128
22717#define __DECL_SIMD_expm1f32x
22718#define __DECL_SIMD_expm1f64x
22719#define __DECL_SIMD_expm1f128x
22720#define __DECL_SIMD_sinh
22721#define __DECL_SIMD_sinhf
22722#define __DECL_SIMD_sinhl
22723#define __DECL_SIMD_sinhf16
22724#define __DECL_SIMD_sinhf32
22725#define __DECL_SIMD_sinhf64
22726#define __DECL_SIMD_sinhf128
22727#define __DECL_SIMD_sinhf32x
22728#define __DECL_SIMD_sinhf64x
22729#define __DECL_SIMD_sinhf128x
22730#define __DECL_SIMD_cbrt
22731#define __DECL_SIMD_cbrtf
22732#define __DECL_SIMD_cbrtl
22733#define __DECL_SIMD_cbrtf16
22734#define __DECL_SIMD_cbrtf32
22735#define __DECL_SIMD_cbrtf64
22736#define __DECL_SIMD_cbrtf128
22737#define __DECL_SIMD_cbrtf32x
22738#define __DECL_SIMD_cbrtf64x
22739#define __DECL_SIMD_cbrtf128x
22740#define __DECL_SIMD_atan2
22741#define __DECL_SIMD_atan2f
22742#define __DECL_SIMD_atan2l
22743#define __DECL_SIMD_atan2f16
22744#define __DECL_SIMD_atan2f32
22745#define __DECL_SIMD_atan2f64
22746#define __DECL_SIMD_atan2f128
22747#define __DECL_SIMD_atan2f32x
22748#define __DECL_SIMD_atan2f64x
22749#define __DECL_SIMD_atan2f128x
22750#define __DECL_SIMD_log10
22751#define __DECL_SIMD_log10f
22752#define __DECL_SIMD_log10l
22753#define __DECL_SIMD_log10f16
22754#define __DECL_SIMD_log10f32
22755#define __DECL_SIMD_log10f64
22756#define __DECL_SIMD_log10f128
22757#define __DECL_SIMD_log10f32x
22758#define __DECL_SIMD_log10f64x
22759#define __DECL_SIMD_log10f128x
22760#define __DECL_SIMD_log2
22761#define __DECL_SIMD_log2f
22762#define __DECL_SIMD_log2l
22763#define __DECL_SIMD_log2f16
22764#define __DECL_SIMD_log2f32
22765#define __DECL_SIMD_log2f64
22766#define __DECL_SIMD_log2f128
22767#define __DECL_SIMD_log2f32x
22768#define __DECL_SIMD_log2f64x
22769#define __DECL_SIMD_log2f128x
22770#define __DECL_SIMD_log1p
22771#define __DECL_SIMD_log1pf
22772#define __DECL_SIMD_log1pl
22773#define __DECL_SIMD_log1pf16
22774#define __DECL_SIMD_log1pf32
22775#define __DECL_SIMD_log1pf64
22776#define __DECL_SIMD_log1pf128
22777#define __DECL_SIMD_log1pf32x
22778#define __DECL_SIMD_log1pf64x
22779#define __DECL_SIMD_log1pf128x
22780#define __DECL_SIMD_atanh
22781#define __DECL_SIMD_atanhf
22782#define __DECL_SIMD_atanhl
22783#define __DECL_SIMD_atanhf16
22784#define __DECL_SIMD_atanhf32
22785#define __DECL_SIMD_atanhf64
22786#define __DECL_SIMD_atanhf128
22787#define __DECL_SIMD_atanhf32x
22788#define __DECL_SIMD_atanhf64x
22789#define __DECL_SIMD_atanhf128x
22790#define __DECL_SIMD_acosh
22791#define __DECL_SIMD_acoshf
22792#define __DECL_SIMD_acoshl
22793#define __DECL_SIMD_acoshf16
22794#define __DECL_SIMD_acoshf32
22795#define __DECL_SIMD_acoshf64
22796#define __DECL_SIMD_acoshf128
22797#define __DECL_SIMD_acoshf32x
22798#define __DECL_SIMD_acoshf64x
22799#define __DECL_SIMD_acoshf128x
22800#define __DECL_SIMD_erf
22801#define __DECL_SIMD_erff
22802#define __DECL_SIMD_erfl
22803#define __DECL_SIMD_erff16
22804#define __DECL_SIMD_erff32
22805#define __DECL_SIMD_erff64
22806#define __DECL_SIMD_erff128
22807#define __DECL_SIMD_erff32x
22808#define __DECL_SIMD_erff64x
22809#define __DECL_SIMD_erff128x
22810#define __DECL_SIMD_tanh
22811#define __DECL_SIMD_tanhf
22812#define __DECL_SIMD_tanhl
22813#define __DECL_SIMD_tanhf16
22814#define __DECL_SIMD_tanhf32
22815#define __DECL_SIMD_tanhf64
22816#define __DECL_SIMD_tanhf128
22817#define __DECL_SIMD_tanhf32x
22818#define __DECL_SIMD_tanhf64x
22819#define __DECL_SIMD_tanhf128x
22820#define __DECL_SIMD_asinh
22821#define __DECL_SIMD_asinhf
22822#define __DECL_SIMD_asinhl
22823#define __DECL_SIMD_asinhf16
22824#define __DECL_SIMD_asinhf32
22825#define __DECL_SIMD_asinhf64
22826#define __DECL_SIMD_asinhf128
22827#define __DECL_SIMD_asinhf32x
22828#define __DECL_SIMD_asinhf64x
22829#define __DECL_SIMD_asinhf128x
22830#define __DECL_SIMD_erfc
22831#define __DECL_SIMD_erfcf
22832#define __DECL_SIMD_erfcl
22833#define __DECL_SIMD_erfcf16
22834#define __DECL_SIMD_erfcf32
22835#define __DECL_SIMD_erfcf64
22836#define __DECL_SIMD_erfcf128
22837#define __DECL_SIMD_erfcf32x
22838#define __DECL_SIMD_erfcf64x
22839#define __DECL_SIMD_erfcf128x
22840#define __DECL_SIMD_tan
22841#define __DECL_SIMD_tanf
22842#define __DECL_SIMD_tanl
22843#define __DECL_SIMD_tanf16
22844#define __DECL_SIMD_tanf32
22845#define __DECL_SIMD_tanf64
22846#define __DECL_SIMD_tanf128
22847#define __DECL_SIMD_tanf32x
22848#define __DECL_SIMD_tanf64x
22849#define __DECL_SIMD_tanf128x
22850#define HUGE_VAL (__builtin_huge_val ())
22851#define HUGE_VALF (__builtin_huge_valf ())
22852#define HUGE_VALL (__builtin_huge_vall ())
22853#define HUGE_VAL_F32 (__builtin_huge_valf32 ())
22854#define HUGE_VAL_F64 (__builtin_huge_valf64 ())
22855#define HUGE_VAL_F128 (__builtin_huge_valf128 ())
22856#define HUGE_VAL_F32X (__builtin_huge_valf32x ())
22857#define HUGE_VAL_F64X (__builtin_huge_valf64x ())
22858#define INFINITY (__builtin_inff ())
22859#define NAN (__builtin_nanf (""))
22860#define SNANF (__builtin_nansf (""))
22861#define SNAN (__builtin_nans (""))
22862#define SNANL (__builtin_nansl (""))
22863#define SNANF32 (__builtin_nansf32 (""))
22864#define SNANF64 (__builtin_nansf64 (""))
22865#define SNANF128 (__builtin_nansf128 (""))
22866#define SNANF32X (__builtin_nansf32x (""))
22867#define SNANF64X (__builtin_nansf64x (""))
22868#define __GLIBC_FLT_EVAL_METHOD __FLT_EVAL_METHOD__
22869#define __FP_LOGB0_IS_MIN 1
22870#define __FP_LOGBNAN_IS_MIN 1
22871#define FP_ILOGB0 (-2147483647 - 1)
22872#define FP_ILOGBNAN (-2147483647 - 1)
22873#define __FP_LONG_MAX 0x7fffffffffffffffL
22874#define FP_LLOGB0 (-__FP_LONG_MAX - 1)
22875#define FP_LLOGBNAN (-__FP_LONG_MAX - 1)
22876#define FP_INT_UPWARD 0
22877#define FP_INT_DOWNWARD 1
22878#define FP_INT_TOWARDZERO 2
22879#define FP_INT_TONEARESTFROMZERO 3
22880#define FP_INT_TONEAREST 4
22881#define __SIMD_DECL(function) __CONCAT (__DECL_SIMD_, function)
22882#define __MATHCALL_VEC(function,suffix,args) __SIMD_DECL (__MATH_PRECNAME (function, suffix)) __MATHCALL (function, suffix, args)
22883#define __MATHDECL_VEC(type,function,suffix,args) __SIMD_DECL (__MATH_PRECNAME (function, suffix)) __MATHDECL(type, function,suffix, args)
22884#define __MATHCALL(function,suffix,args) __MATHDECL (_Mdouble_,function,suffix, args)
22885#define __MATHDECL(type,function,suffix,args) __MATHDECL_1(type, function,suffix, args); __MATHDECL_1(type, __CONCAT(__,function),suffix, args)
22886#define __MATHCALLX(function,suffix,args,attrib) __MATHDECLX (_Mdouble_,function,suffix, args, attrib)
22887#define __MATHDECLX(type,function,suffix,args,attrib) __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib)
22888#define __MATHDECL_1_IMPL(type,function,suffix,args) extern type __MATH_PRECNAME(function,suffix) args __THROW
22889#define __MATHDECL_1(type,function,suffix,args) __MATHDECL_1_IMPL(type, function, suffix, args)
22890#define __MATHDECL_ALIAS(type,function,suffix,args,alias) __MATHDECL_1(type, function, suffix, args)
22891#define __MATHREDIR(type,function,suffix,args,to) extern type __REDIRECT_NTH (__MATH_PRECNAME (function, suffix), args, to)
22892#define _Mdouble_ double
22893#define __MATH_PRECNAME(name,r) __CONCAT(name,r)
22894#define __MATH_DECLARING_DOUBLE 1
22895#define __MATH_DECLARING_FLOATN 0
22896#undef _Mdouble_
22897#undef __MATH_PRECNAME
22898#undef __MATH_DECLARING_DOUBLE
22899#undef __MATH_DECLARING_FLOATN
22900#define _Mdouble_ float
22901#define __MATH_PRECNAME(name,r) name ##f ##r
22902#define __MATH_DECLARING_DOUBLE 0
22903#define __MATH_DECLARING_FLOATN 0
22904#undef _Mdouble_
22905#undef __MATH_PRECNAME
22906#undef __MATH_DECLARING_DOUBLE
22907#undef __MATH_DECLARING_FLOATN
22908#define _Mdouble_ long double
22909#define __MATH_PRECNAME(name,r) name ##l ##r
22910#define __MATH_DECLARING_DOUBLE 0
22911#define __MATH_DECLARING_FLOATN 0
22912#define __MATH_DECLARE_LDOUBLE 1
22913#undef _Mdouble_
22914#undef __MATH_PRECNAME
22915#undef __MATH_DECLARING_DOUBLE
22916#undef __MATH_DECLARING_FLOATN
22917#define _Mdouble_ _Float32
22918#define __MATH_PRECNAME(name,r) name ##f32 ##r
22919#define __MATH_DECLARING_DOUBLE 0
22920#define __MATH_DECLARING_FLOATN 1
22921#undef _Mdouble_
22922#undef __MATH_PRECNAME
22923#undef __MATH_DECLARING_DOUBLE
22924#undef __MATH_DECLARING_FLOATN
22925#define _Mdouble_ _Float64
22926#define __MATH_PRECNAME(name,r) name ##f64 ##r
22927#define __MATH_DECLARING_DOUBLE 0
22928#define __MATH_DECLARING_FLOATN 1
22929#undef _Mdouble_
22930#undef __MATH_PRECNAME
22931#undef __MATH_DECLARING_DOUBLE
22932#undef __MATH_DECLARING_FLOATN
22933#define _Mdouble_ _Float128
22934#define __MATH_PRECNAME(name,r) name ##f128 ##r
22935#define __MATH_DECLARING_DOUBLE 0
22936#define __MATH_DECLARING_FLOATN 1
22937#undef _Mdouble_
22938#undef __MATH_PRECNAME
22939#undef __MATH_DECLARING_DOUBLE
22940#undef __MATH_DECLARING_FLOATN
22941#define _Mdouble_ _Float32x
22942#define __MATH_PRECNAME(name,r) name ##f32x ##r
22943#define __MATH_DECLARING_DOUBLE 0
22944#define __MATH_DECLARING_FLOATN 1
22945#undef _Mdouble_
22946#undef __MATH_PRECNAME
22947#undef __MATH_DECLARING_DOUBLE
22948#undef __MATH_DECLARING_FLOATN
22949#define _Mdouble_ _Float64x
22950#define __MATH_PRECNAME(name,r) name ##f64x ##r
22951#define __MATH_DECLARING_DOUBLE 0
22952#define __MATH_DECLARING_FLOATN 1
22953#undef _Mdouble_
22954#undef __MATH_PRECNAME
22955#undef __MATH_DECLARING_DOUBLE
22956#undef __MATH_DECLARING_FLOATN
22957#undef __MATHDECL_1_IMPL
22958#undef __MATHDECL_1
22959#undef __MATHDECL_ALIAS
22960#undef __MATHDECL
22961#undef __MATHCALL
22962#define __MATHCALL_NARROW_ARGS_1 (_Marg_ __x)
22963#define __MATHCALL_NARROW_ARGS_2 (_Marg_ __x, _Marg_ __y)
22964#define __MATHCALL_NARROW_ARGS_3 (_Marg_ __x, _Marg_ __y, _Marg_ __z)
22965#define __MATHCALL_NARROW_NORMAL(func,nargs) extern _Mret_ func __MATHCALL_NARROW_ARGS_ ## nargs __THROW
22966#define __MATHCALL_NARROW_REDIR(func,redir,nargs) extern _Mret_ __REDIRECT_NTH (func, __MATHCALL_NARROW_ARGS_ ## nargs, redir)
22967#define __MATHCALL_NARROW(func,redir,nargs) __MATHCALL_NARROW_NORMAL (func, nargs)
22968#define _Mret_ float
22969#define _Marg_ double
22970#define __MATHCALL_NAME(name) f ## name
22971#undef _Mret_
22972#undef _Marg_
22973#undef __MATHCALL_NAME
22974#define _Mret_ float
22975#define _Marg_ long double
22976#define __MATHCALL_NAME(name) f ## name ## l
22977#undef _Mret_
22978#undef _Marg_
22979#undef __MATHCALL_NAME
22980#define _Mret_ double
22981#define _Marg_ long double
22982#define __MATHCALL_NAME(name) d ## name ## l
22983#undef _Mret_
22984#undef _Marg_
22985#undef __MATHCALL_NAME
22986#define _Mret_ _Float32
22987#define _Marg_ _Float32x
22988#define __MATHCALL_NAME(name) f32 ## name ## f32x
22989#undef _Mret_
22990#undef _Marg_
22991#undef __MATHCALL_NAME
22992#define _Mret_ _Float32
22993#define _Marg_ _Float64
22994#define __MATHCALL_NAME(name) f32 ## name ## f64
22995#undef _Mret_
22996#undef _Marg_
22997#undef __MATHCALL_NAME
22998#define _Mret_ _Float32
22999#define _Marg_ _Float64x
23000#define __MATHCALL_NAME(name) f32 ## name ## f64x
23001#undef _Mret_
23002#undef _Marg_
23003#undef __MATHCALL_NAME
23004#define _Mret_ _Float32
23005#define _Marg_ _Float128
23006#define __MATHCALL_NAME(name) f32 ## name ## f128
23007#undef _Mret_
23008#undef _Marg_
23009#undef __MATHCALL_NAME
23010#define _Mret_ _Float32x
23011#define _Marg_ _Float64
23012#define __MATHCALL_NAME(name) f32x ## name ## f64
23013#undef _Mret_
23014#undef _Marg_
23015#undef __MATHCALL_NAME
23016#define _Mret_ _Float32x
23017#define _Marg_ _Float64x
23018#define __MATHCALL_NAME(name) f32x ## name ## f64x
23019#undef _Mret_
23020#undef _Marg_
23021#undef __MATHCALL_NAME
23022#define _Mret_ _Float32x
23023#define _Marg_ _Float128
23024#define __MATHCALL_NAME(name) f32x ## name ## f128
23025#undef _Mret_
23026#undef _Marg_
23027#undef __MATHCALL_NAME
23028#define _Mret_ _Float64
23029#define _Marg_ _Float64x
23030#define __MATHCALL_NAME(name) f64 ## name ## f64x
23031#undef _Mret_
23032#undef _Marg_
23033#undef __MATHCALL_NAME
23034#define _Mret_ _Float64
23035#define _Marg_ _Float128
23036#define __MATHCALL_NAME(name) f64 ## name ## f128
23037#undef _Mret_
23038#undef _Marg_
23039#undef __MATHCALL_NAME
23040#define _Mret_ _Float64x
23041#define _Marg_ _Float128
23042#define __MATHCALL_NAME(name) f64x ## name ## f128
23043#undef _Mret_
23044#undef _Marg_
23045#undef __MATHCALL_NAME
23046#undef __MATHCALL_NARROW_ARGS_1
23047#undef __MATHCALL_NARROW_ARGS_2
23048#undef __MATHCALL_NARROW_ARGS_3
23049#undef __MATHCALL_NARROW_NORMAL
23050#undef __MATHCALL_NARROW_REDIR
23051#undef __MATHCALL_NARROW
23052#define __MATH_TG_F32(FUNC,ARGS) _Float32: FUNC ## f ARGS,
23053#define __MATH_TG_F64X(FUNC,ARGS) _Float64x: FUNC ## l ARGS,
23054#define __MATH_TG(TG_ARG,FUNC,ARGS) _Generic ((TG_ARG), float: FUNC ## f ARGS, __MATH_TG_F32 (FUNC, ARGS) default: FUNC ARGS, long double: FUNC ## l ARGS, __MATH_TG_F64X (FUNC, ARGS) _Float128: FUNC ## f128 ARGS)
23055#define FP_NAN 0
23056#define FP_INFINITE 1
23057#define FP_ZERO 2
23058#define FP_SUBNORMAL 3
23059#define FP_NORMAL 4
23060#define fpclassify(x) __builtin_fpclassify (FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x)
23061#define signbit(x) __builtin_signbit (x)
23062#define isfinite(x) __builtin_isfinite (x)
23063#define isnormal(x) __builtin_isnormal (x)
23064#define isnan(x) __builtin_isnan (x)
23065#define isinf(x) __builtin_isinf_sign (x)
23066#define MATH_ERRNO 1
23067#define MATH_ERREXCEPT 2
23068#define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT)
23069#define __iscanonicalf(x) ((void) (__typeof (x)) (x), 1)
23070#define __iscanonical(x) ((void) (__typeof (x)) (x), 1)
23071#define __iscanonicalf128(x) ((void) (__typeof (x)) (x), 1)
23072#define iscanonical(x) __MATH_TG ((x), __iscanonical, (x))
23073#define issignaling(x) __MATH_TG ((x), __issignaling, (x))
23074#define issubnormal(x) (fpclassify (x) == FP_SUBNORMAL)
23075#define iszero(x) (((__typeof (x)) (x)) == 0)
23076#define MAXFLOAT 3.40282347e+38F
23077#define M_E 2.7182818284590452354
23078#define M_LOG2E 1.4426950408889634074
23079#define M_LOG10E 0.43429448190325182765
23080#define M_LN2 0.69314718055994530942
23081#define M_LN10 2.30258509299404568402
23082#define M_PI 3.14159265358979323846
23083#define M_PI_2 1.57079632679489661923
23084#define M_PI_4 0.78539816339744830962
23085#define M_1_PI 0.31830988618379067154
23086#define M_2_PI 0.63661977236758134308
23087#define M_2_SQRTPI 1.12837916709551257390
23088#define M_SQRT2 1.41421356237309504880
23089#define M_SQRT1_2 0.70710678118654752440
23090#define M_Ef 2.7182818284590452354f
23091#define M_LOG2Ef 1.4426950408889634074f
23092#define M_LOG10Ef 0.43429448190325182765f
23093#define M_LN2f 0.69314718055994530942f
23094#define M_LN10f 2.30258509299404568402f
23095#define M_PIf 3.14159265358979323846f
23096#define M_PI_2f 1.57079632679489661923f
23097#define M_PI_4f 0.78539816339744830962f
23098#define M_1_PIf 0.31830988618379067154f
23099#define M_2_PIf 0.63661977236758134308f
23100#define M_2_SQRTPIf 1.12837916709551257390f
23101#define M_SQRT2f 1.41421356237309504880f
23102#define M_SQRT1_2f 0.70710678118654752440f
23103#define M_El 2.718281828459045235360287471352662498L
23104#define M_LOG2El 1.442695040888963407359924681001892137L
23105#define M_LOG10El 0.434294481903251827651128918916605082L
23106#define M_LN2l 0.693147180559945309417232121458176568L
23107#define M_LN10l 2.302585092994045684017991454684364208L
23108#define M_PIl 3.141592653589793238462643383279502884L
23109#define M_PI_2l 1.570796326794896619231321691639751442L
23110#define M_PI_4l 0.785398163397448309615660845819875721L
23111#define M_1_PIl 0.318309886183790671537767526745028724L
23112#define M_2_PIl 0.636619772367581343075535053490057448L
23113#define M_2_SQRTPIl 1.128379167095512573896158903121545172L
23114#define M_SQRT2l 1.414213562373095048801688724209698079L
23115#define M_SQRT1_2l 0.707106781186547524400844362104849039L
23116#define M_Ef32 __f32 (2.718281828459045235360287471352662498)
23117#define M_LOG2Ef32 __f32 (1.442695040888963407359924681001892137)
23118#define M_LOG10Ef32 __f32 (0.434294481903251827651128918916605082)
23119#define M_LN2f32 __f32 (0.693147180559945309417232121458176568)
23120#define M_LN10f32 __f32 (2.302585092994045684017991454684364208)
23121#define M_PIf32 __f32 (3.141592653589793238462643383279502884)
23122#define M_PI_2f32 __f32 (1.570796326794896619231321691639751442)
23123#define M_PI_4f32 __f32 (0.785398163397448309615660845819875721)
23124#define M_1_PIf32 __f32 (0.318309886183790671537767526745028724)
23125#define M_2_PIf32 __f32 (0.636619772367581343075535053490057448)
23126#define M_2_SQRTPIf32 __f32 (1.128379167095512573896158903121545172)
23127#define M_SQRT2f32 __f32 (1.414213562373095048801688724209698079)
23128#define M_SQRT1_2f32 __f32 (0.707106781186547524400844362104849039)
23129#define M_Ef64 __f64 (2.718281828459045235360287471352662498)
23130#define M_LOG2Ef64 __f64 (1.442695040888963407359924681001892137)
23131#define M_LOG10Ef64 __f64 (0.434294481903251827651128918916605082)
23132#define M_LN2f64 __f64 (0.693147180559945309417232121458176568)
23133#define M_LN10f64 __f64 (2.302585092994045684017991454684364208)
23134#define M_PIf64 __f64 (3.141592653589793238462643383279502884)
23135#define M_PI_2f64 __f64 (1.570796326794896619231321691639751442)
23136#define M_PI_4f64 __f64 (0.785398163397448309615660845819875721)
23137#define M_1_PIf64 __f64 (0.318309886183790671537767526745028724)
23138#define M_2_PIf64 __f64 (0.636619772367581343075535053490057448)
23139#define M_2_SQRTPIf64 __f64 (1.128379167095512573896158903121545172)
23140#define M_SQRT2f64 __f64 (1.414213562373095048801688724209698079)
23141#define M_SQRT1_2f64 __f64 (0.707106781186547524400844362104849039)
23142#define M_Ef128 __f128 (2.718281828459045235360287471352662498)
23143#define M_LOG2Ef128 __f128 (1.442695040888963407359924681001892137)
23144#define M_LOG10Ef128 __f128 (0.434294481903251827651128918916605082)
23145#define M_LN2f128 __f128 (0.693147180559945309417232121458176568)
23146#define M_LN10f128 __f128 (2.302585092994045684017991454684364208)
23147#define M_PIf128 __f128 (3.141592653589793238462643383279502884)
23148#define M_PI_2f128 __f128 (1.570796326794896619231321691639751442)
23149#define M_PI_4f128 __f128 (0.785398163397448309615660845819875721)
23150#define M_1_PIf128 __f128 (0.318309886183790671537767526745028724)
23151#define M_2_PIf128 __f128 (0.636619772367581343075535053490057448)
23152#define M_2_SQRTPIf128 __f128 (1.128379167095512573896158903121545172)
23153#define M_SQRT2f128 __f128 (1.414213562373095048801688724209698079)
23154#define M_SQRT1_2f128 __f128 (0.707106781186547524400844362104849039)
23155#define M_Ef32x __f32x (2.718281828459045235360287471352662498)
23156#define M_LOG2Ef32x __f32x (1.442695040888963407359924681001892137)
23157#define M_LOG10Ef32x __f32x (0.434294481903251827651128918916605082)
23158#define M_LN2f32x __f32x (0.693147180559945309417232121458176568)
23159#define M_LN10f32x __f32x (2.302585092994045684017991454684364208)
23160#define M_PIf32x __f32x (3.141592653589793238462643383279502884)
23161#define M_PI_2f32x __f32x (1.570796326794896619231321691639751442)
23162#define M_PI_4f32x __f32x (0.785398163397448309615660845819875721)
23163#define M_1_PIf32x __f32x (0.318309886183790671537767526745028724)
23164#define M_2_PIf32x __f32x (0.636619772367581343075535053490057448)
23165#define M_2_SQRTPIf32x __f32x (1.128379167095512573896158903121545172)
23166#define M_SQRT2f32x __f32x (1.414213562373095048801688724209698079)
23167#define M_SQRT1_2f32x __f32x (0.707106781186547524400844362104849039)
23168#define M_Ef64x __f64x (2.718281828459045235360287471352662498)
23169#define M_LOG2Ef64x __f64x (1.442695040888963407359924681001892137)
23170#define M_LOG10Ef64x __f64x (0.434294481903251827651128918916605082)
23171#define M_LN2f64x __f64x (0.693147180559945309417232121458176568)
23172#define M_LN10f64x __f64x (2.302585092994045684017991454684364208)
23173#define M_PIf64x __f64x (3.141592653589793238462643383279502884)
23174#define M_PI_2f64x __f64x (1.570796326794896619231321691639751442)
23175#define M_PI_4f64x __f64x (0.785398163397448309615660845819875721)
23176#define M_1_PIf64x __f64x (0.318309886183790671537767526745028724)
23177#define M_2_PIf64x __f64x (0.636619772367581343075535053490057448)
23178#define M_2_SQRTPIf64x __f64x (1.128379167095512573896158903121545172)
23179#define M_SQRT2f64x __f64x (1.414213562373095048801688724209698079)
23180#define M_SQRT1_2f64x __f64x (0.707106781186547524400844362104849039)
23181#define isgreater(x,y) __builtin_isgreater(x, y)
23182#define isgreaterequal(x,y) __builtin_isgreaterequal(x, y)
23183#define isless(x,y) __builtin_isless(x, y)
23184#define islessequal(x,y) __builtin_islessequal(x, y)
23185#define islessgreater(x,y) __builtin_islessgreater(x, y)
23186#define isunordered(x,y) __builtin_isunordered(x, y)
23187#define __MATH_EVAL_FMT2(x,y) ((x) + (y) + 0.0f)
23188#define iseqsig(x,y) __MATH_TG (__MATH_EVAL_FMT2 (x, y), __iseqsig, ((x), (y)))
23189#define _TIME_H 1
23190#define __need_size_t
23191#define __need_NULL
23192#undef __need_ptrdiff_t
23193#undef __need_size_t
23194#undef __need_wchar_t
23195#undef NULL
23196#define NULL ((void *)0)
23197#undef __need_NULL
23198#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
23199#define _BITS_TIME_H 1
23200#define CLOCKS_PER_SEC ((__clock_t) 1000000)
23201#define CLOCK_REALTIME 0
23202#define CLOCK_MONOTONIC 1
23203#define CLOCK_PROCESS_CPUTIME_ID 2
23204#define CLOCK_THREAD_CPUTIME_ID 3
23205#define CLOCK_MONOTONIC_RAW 4
23206#define CLOCK_REALTIME_COARSE 5
23207#define CLOCK_MONOTONIC_COARSE 6
23208#define CLOCK_BOOTTIME 7
23209#define CLOCK_REALTIME_ALARM 8
23210#define CLOCK_BOOTTIME_ALARM 9
23211#define CLOCK_TAI 11
23212#define TIMER_ABSTIME 1
23213#define _BITS_TIMEX_H 1
23214#define ADJ_OFFSET 0x0001
23215#define ADJ_FREQUENCY 0x0002
23216#define ADJ_MAXERROR 0x0004
23217#define ADJ_ESTERROR 0x0008
23218#define ADJ_STATUS 0x0010
23219#define ADJ_TIMECONST 0x0020
23220#define ADJ_TAI 0x0080
23221#define ADJ_SETOFFSET 0x0100
23222#define ADJ_MICRO 0x1000
23223#define ADJ_NANO 0x2000
23224#define ADJ_TICK 0x4000
23225#define ADJ_OFFSET_SINGLESHOT 0x8001
23226#define ADJ_OFFSET_SS_READ 0xa001
23227#define MOD_OFFSET ADJ_OFFSET
23228#define MOD_FREQUENCY ADJ_FREQUENCY
23229#define MOD_MAXERROR ADJ_MAXERROR
23230#define MOD_ESTERROR ADJ_ESTERROR
23231#define MOD_STATUS ADJ_STATUS
23232#define MOD_TIMECONST ADJ_TIMECONST
23233#define MOD_CLKB ADJ_TICK
23234#define MOD_CLKA ADJ_OFFSET_SINGLESHOT
23235#define MOD_TAI ADJ_TAI
23236#define MOD_MICRO ADJ_MICRO
23237#define MOD_NANO ADJ_NANO
23238#define STA_PLL 0x0001
23239#define STA_PPSFREQ 0x0002
23240#define STA_PPSTIME 0x0004
23241#define STA_FLL 0x0008
23242#define STA_INS 0x0010
23243#define STA_DEL 0x0020
23244#define STA_UNSYNC 0x0040
23245#define STA_FREQHOLD 0x0080
23246#define STA_PPSSIGNAL 0x0100
23247#define STA_PPSJITTER 0x0200
23248#define STA_PPSWANDER 0x0400
23249#define STA_PPSERROR 0x0800
23250#define STA_CLOCKERR 0x1000
23251#define STA_NANO 0x2000
23252#define STA_MODE 0x4000
23253#define STA_CLK 0x8000
23254#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK)
23255#define __struct_tm_defined 1
23256#define __itimerspec_defined 1
23257#define TIME_UTC 1
23258#define __isleap(year) ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
23259#define _SYS_TIME_H 1
23260#define TIMEVAL_TO_TIMESPEC(tv,ts) { (ts)->tv_sec = (tv)->tv_sec; (ts)->tv_nsec = (tv)->tv_usec * 1000; }
23261#define TIMESPEC_TO_TIMEVAL(tv,ts) { (tv)->tv_sec = (ts)->tv_sec; (tv)->tv_usec = (ts)->tv_nsec / 1000; }
23262#define ITIMER_REAL ITIMER_REAL
23263#define ITIMER_VIRTUAL ITIMER_VIRTUAL
23264#define ITIMER_PROF ITIMER_PROF
23265#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
23266#define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0)
23267#define timercmp(a,b,CMP) (((a)->tv_sec == (b)->tv_sec) ? ((a)->tv_usec CMP (b)->tv_usec) : ((a)->tv_sec CMP (b)->tv_sec))
23268#define timeradd(a,b,result) do { (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; if ((result)->tv_usec >= 1000000) { ++(result)->tv_sec; (result)->tv_usec -= 1000000; } } while (0)
23269#define timersub(a,b,result) do { (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; if ((result)->tv_usec < 0) { --(result)->tv_sec; (result)->tv_usec += 1000000; } } while (0)
23270#pragma GCC visibility push(default)
23271#define HAVE_FINITE 1
23272#define finite(x) isfinite(x)
23273#pragma GCC visibility pop
23274#define RUBY
23275#define RB_GNUC_EXTENSION __extension__
23276#define RB_GNUC_EXTENSION_BLOCK(x) __extension__ ({ x; })
23277#define RUBY_MBCHAR_MAXSIZE INT_MAX
23278#define FLUSH_REGISTER_WINDOWS ((void)0)
23279#define RUBY_ABI_H
23280#define RUBY_ABI_VERSION 1
23281#define RUBY_DLN_CHECK_ABI
23282#define RBIMPL_ANYARGS_H
23283#define RBIMPL_ATTR_WEAKREF_H
23284#define RBIMPL_ATTR_WEAKREF(sym) __attribute__((__weakref__(#sym)))
23285#define RBIMPL_INTERN_CLASS_H
23286#define RBIMPL_VALUE_H
23287#define RBIMPL_STATIC_ASSERT_H
23288#define _ASSERT_H 1
23289#define __ASSERT_VOID_CAST (void)
23290#define assert(expr) (__ASSERT_VOID_CAST (0))
23291#define assert_perror(errnum) (__ASSERT_VOID_CAST (0))
23292#undef static_assert
23293#define static_assert _Static_assert
23294#define RBIMPL_STATIC_ASSERT0 __extension__ _Static_assert
23295#define RBIMPL_STATIC_ASSERT(name,expr) RBIMPL_STATIC_ASSERT0(expr, #name ": " #expr)
23296#define RUBY_BACKWARD2_LIMITS_H
23297#define _GCC_LIMITS_H_
23298#define _GCC_NEXT_LIMITS_H
23299#define _LIBC_LIMITS_H_ 1
23300#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
23301#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
23302#undef __GLIBC_USE_LIB_EXT2
23303#define __GLIBC_USE_LIB_EXT2 1
23304#undef __GLIBC_USE_IEC_60559_BFP_EXT
23305#define __GLIBC_USE_IEC_60559_BFP_EXT 1
23306#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
23307#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
23308#undef __GLIBC_USE_IEC_60559_EXT
23309#define __GLIBC_USE_IEC_60559_EXT 1
23310#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
23311#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
23312#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
23313#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
23314#undef __GLIBC_USE_IEC_60559_TYPES_EXT
23315#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
23316#define MB_LEN_MAX 16
23317#define LLONG_MIN (-LLONG_MAX-1)
23318#define LLONG_MAX __LONG_LONG_MAX__
23319#define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
23320#define CHAR_WIDTH 8
23321#define SCHAR_WIDTH 8
23322#define UCHAR_WIDTH 8
23323#define SHRT_WIDTH 16
23324#define USHRT_WIDTH 16
23325#define INT_WIDTH 32
23326#define UINT_WIDTH 32
23327#define LONG_WIDTH __WORDSIZE
23328#define ULONG_WIDTH __WORDSIZE
23329#define LLONG_WIDTH 64
23330#define ULLONG_WIDTH 64
23331#define BOOL_MAX 1
23332#define BOOL_WIDTH 1
23333#define _BITS_POSIX1_LIM_H 1
23334#define __WORDSIZE 64
23335#define __WORDSIZE_TIME64_COMPAT32 1
23336#define __SYSCALL_WORDSIZE 64
23337#define _POSIX_AIO_LISTIO_MAX 2
23338#define _POSIX_AIO_MAX 1
23339#define _POSIX_ARG_MAX 4096
23340#define _POSIX_CHILD_MAX 25
23341#define _POSIX_DELAYTIMER_MAX 32
23342#define _POSIX_HOST_NAME_MAX 255
23343#define _POSIX_LINK_MAX 8
23344#define _POSIX_LOGIN_NAME_MAX 9
23345#define _POSIX_MAX_CANON 255
23346#define _POSIX_MAX_INPUT 255
23347#define _POSIX_MQ_OPEN_MAX 8
23348#define _POSIX_MQ_PRIO_MAX 32
23349#define _POSIX_NAME_MAX 14
23350#define _POSIX_NGROUPS_MAX 8
23351#define _POSIX_OPEN_MAX 20
23352#define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX
23353#define _POSIX_PATH_MAX 256
23354#define _POSIX_PIPE_BUF 512
23355#define _POSIX_RE_DUP_MAX 255
23356#define _POSIX_RTSIG_MAX 8
23357#define _POSIX_SEM_NSEMS_MAX 256
23358#define _POSIX_SEM_VALUE_MAX 32767
23359#define _POSIX_SIGQUEUE_MAX 32
23360#define _POSIX_SSIZE_MAX 32767
23361#define _POSIX_STREAM_MAX 8
23362#define _POSIX_SYMLINK_MAX 255
23363#define _POSIX_SYMLOOP_MAX 8
23364#define _POSIX_TIMER_MAX 32
23365#define _POSIX_TTY_NAME_MAX 9
23366#define _POSIX_TZNAME_MAX 6
23367#define _POSIX_QLIMIT 1
23368#define _POSIX_HIWAT _POSIX_PIPE_BUF
23369#define _POSIX_UIO_MAXIOV 16
23370#define _POSIX_CLOCKRES_MIN 20000000
23371#define __undef_NR_OPEN
23372#define __undef_LINK_MAX
23373#define __undef_OPEN_MAX
23374#define __undef_ARG_MAX
23375#define _LINUX_LIMITS_H
23376#define NR_OPEN 1024
23377#define NGROUPS_MAX 65536
23378#define ARG_MAX 131072
23379#define LINK_MAX 127
23380#define MAX_CANON 255
23381#define MAX_INPUT 255
23382#define NAME_MAX 255
23383#define PATH_MAX 4096
23384#define PIPE_BUF 4096
23385#define XATTR_NAME_MAX 255
23386#define XATTR_SIZE_MAX 65536
23387#define XATTR_LIST_MAX 65536
23388#define RTSIG_MAX 32
23389#undef NR_OPEN
23390#undef __undef_NR_OPEN
23391#undef LINK_MAX
23392#undef __undef_LINK_MAX
23393#undef OPEN_MAX
23394#undef __undef_OPEN_MAX
23395#undef ARG_MAX
23396#undef __undef_ARG_MAX
23397#define _POSIX_THREAD_KEYS_MAX 128
23398#define PTHREAD_KEYS_MAX 1024
23399#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
23400#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
23401#define _POSIX_THREAD_THREADS_MAX 64
23402#undef PTHREAD_THREADS_MAX
23403#define AIO_PRIO_DELTA_MAX 20
23404#define __SC_THREAD_STACK_MIN_VALUE 75
23405#define PTHREAD_STACK_MIN __sysconf (__SC_THREAD_STACK_MIN_VALUE)
23406#define DELAYTIMER_MAX 2147483647
23407#define TTY_NAME_MAX 32
23408#define LOGIN_NAME_MAX 256
23409#define HOST_NAME_MAX 64
23410#define MQ_PRIO_MAX 32768
23411#define SEM_VALUE_MAX (2147483647)
23412#define SSIZE_MAX LONG_MAX
23413#define _BITS_POSIX2_LIM_H 1
23414#define _POSIX2_BC_BASE_MAX 99
23415#define _POSIX2_BC_DIM_MAX 2048
23416#define _POSIX2_BC_SCALE_MAX 99
23417#define _POSIX2_BC_STRING_MAX 1000
23418#define _POSIX2_COLL_WEIGHTS_MAX 2
23419#define _POSIX2_EXPR_NEST_MAX 32
23420#define _POSIX2_LINE_MAX 2048
23421#define _POSIX2_RE_DUP_MAX 255
23422#define _POSIX2_CHARCLASS_NAME_MAX 14
23423#define BC_BASE_MAX _POSIX2_BC_BASE_MAX
23424#define BC_DIM_MAX _POSIX2_BC_DIM_MAX
23425#define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX
23426#define BC_STRING_MAX _POSIX2_BC_STRING_MAX
23427#define COLL_WEIGHTS_MAX 255
23428#define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX
23429#define LINE_MAX _POSIX2_LINE_MAX
23430#define CHARCLASS_NAME_MAX 2048
23431#define RE_DUP_MAX (0x7fff)
23432#define _XOPEN_LIM_H 1
23433#define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV
23434#define _BITS_UIO_LIM_H 1
23435#define __IOV_MAX 1024
23436#define IOV_MAX __IOV_MAX
23437#define NL_ARGMAX _POSIX_ARG_MAX
23438#define NL_LANGMAX _POSIX2_LINE_MAX
23439#define NL_MSGMAX INT_MAX
23440#define NL_NMAX INT_MAX
23441#define NL_SETMAX INT_MAX
23442#define NL_TEXTMAX INT_MAX
23443#define NZERO 20
23444#define WORD_BIT 32
23445#define LONG_BIT 64
23446#undef _GCC_NEXT_LIMITS_H
23447#define _LIMITS_H___
23448#undef CHAR_BIT
23449#define CHAR_BIT __CHAR_BIT__
23450#undef SCHAR_MIN
23451#define SCHAR_MIN (-SCHAR_MAX - 1)
23452#undef SCHAR_MAX
23453#define SCHAR_MAX __SCHAR_MAX__
23454#undef UCHAR_MAX
23455#define UCHAR_MAX (SCHAR_MAX * 2 + 1)
23456#undef CHAR_MIN
23457#define CHAR_MIN SCHAR_MIN
23458#undef CHAR_MAX
23459#define CHAR_MAX SCHAR_MAX
23460#undef SHRT_MIN
23461#define SHRT_MIN (-SHRT_MAX - 1)
23462#undef SHRT_MAX
23463#define SHRT_MAX __SHRT_MAX__
23464#undef USHRT_MAX
23465#define USHRT_MAX (SHRT_MAX * 2 + 1)
23466#undef INT_MIN
23467#define INT_MIN (-INT_MAX - 1)
23468#undef INT_MAX
23469#define INT_MAX __INT_MAX__
23470#undef UINT_MAX
23471#define UINT_MAX (INT_MAX * 2U + 1U)
23472#undef LONG_MIN
23473#define LONG_MIN (-LONG_MAX - 1L)
23474#undef LONG_MAX
23475#define LONG_MAX __LONG_MAX__
23476#undef ULONG_MAX
23477#define ULONG_MAX (LONG_MAX * 2UL + 1UL)
23478#undef LLONG_MIN
23479#define LLONG_MIN (-LLONG_MAX - 1LL)
23480#undef LLONG_MAX
23481#define LLONG_MAX __LONG_LONG_MAX__
23482#undef ULLONG_MAX
23483#define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
23484#undef LONG_LONG_MIN
23485#define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL)
23486#undef LONG_LONG_MAX
23487#define LONG_LONG_MAX __LONG_LONG_MAX__
23488#undef ULONG_LONG_MAX
23489#define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1ULL)
23490#undef CHAR_WIDTH
23491#define CHAR_WIDTH __SCHAR_WIDTH__
23492#undef SCHAR_WIDTH
23493#define SCHAR_WIDTH __SCHAR_WIDTH__
23494#undef UCHAR_WIDTH
23495#define UCHAR_WIDTH __SCHAR_WIDTH__
23496#undef SHRT_WIDTH
23497#define SHRT_WIDTH __SHRT_WIDTH__
23498#undef USHRT_WIDTH
23499#define USHRT_WIDTH __SHRT_WIDTH__
23500#undef INT_WIDTH
23501#define INT_WIDTH __INT_WIDTH__
23502#undef UINT_WIDTH
23503#define UINT_WIDTH __INT_WIDTH__
23504#undef LONG_WIDTH
23505#define LONG_WIDTH __LONG_WIDTH__
23506#undef ULONG_WIDTH
23507#define ULONG_WIDTH __LONG_WIDTH__
23508#undef LLONG_WIDTH
23509#define LLONG_WIDTH __LONG_LONG_WIDTH__
23510#undef ULLONG_WIDTH
23511#define ULLONG_WIDTH __LONG_LONG_WIDTH__
23512#define SIGNED_VALUE long
23513#define SIZEOF_VALUE SIZEOF_LONG
23514#define PRI_VALUE_PREFIX "l"
23515#define RBIMPL_VALUE_NULL 0UL
23516#define RBIMPL_VALUE_ONE 1UL
23517#define RBIMPL_VALUE_FULL ULONG_MAX
23518#pragma GCC visibility push(default)
23519#pragma GCC visibility pop
23520#define RBIMPL_INTERN_VM_H
23521#pragma GCC visibility push(default)
23522#define HAVE_RB_DEFINE_ALLOC_FUNC 1
23523#pragma GCC visibility pop
23524#define RBIMPL_METHOD_H
23525#pragma GCC visibility push(default)
23526#pragma GCC visibility pop
23527#define RBIMPL_CFUNC_IS_rb_f_notimplement(f) __builtin_types_compatible_p( __typeof__(f), __typeof__(rb_f_notimplement))
23528#define RBIMPL_ANYARGS_DISPATCH(expr,truthy,falsy) __builtin_choose_expr( __builtin_choose_expr( __builtin_constant_p(expr), (expr), 0), (truthy), (falsy))
23529#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_singleton_method_m2, rb_define_singleton_method_m3)
23530#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_singleton_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m2(n))
23531#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_singleton_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m1(n))
23532#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_singleton_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_00(n))
23533#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_singleton_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_01(n))
23534#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_singleton_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_02(n))
23535#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_singleton_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_03(n))
23536#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_singleton_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_04(n))
23537#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_singleton_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_05(n))
23538#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_singleton_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_06(n))
23539#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_singleton_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_07(n))
23540#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_singleton_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_08(n))
23541#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_singleton_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_09(n))
23542#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_singleton_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_10(n))
23543#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_singleton_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_11(n))
23544#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_singleton_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_12(n))
23545#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_singleton_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_13(n))
23546#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_singleton_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_14(n))
23547#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_protected_method_m2, rb_define_protected_method_m3)
23548#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_protected_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m2(n))
23549#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_protected_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m1(n))
23550#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_protected_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_00(n))
23551#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_protected_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_01(n))
23552#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_protected_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_02(n))
23553#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_protected_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_03(n))
23554#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_protected_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_04(n))
23555#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_protected_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_05(n))
23556#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_protected_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_06(n))
23557#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_protected_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_07(n))
23558#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_protected_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_08(n))
23559#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_protected_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_09(n))
23560#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_protected_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_10(n))
23561#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_protected_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_11(n))
23562#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_protected_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_12(n))
23563#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_protected_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_13(n))
23564#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_protected_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_14(n))
23565#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_private_method_m2, rb_define_private_method_m3)
23566#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_private_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m2(n))
23567#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_private_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m1(n))
23568#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_private_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_00(n))
23569#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_private_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_01(n))
23570#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_private_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_02(n))
23571#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_private_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_03(n))
23572#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_private_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_04(n))
23573#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_private_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_05(n))
23574#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_private_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_06(n))
23575#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_private_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_07(n))
23576#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_private_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_08(n))
23577#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_private_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_09(n))
23578#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_private_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_10(n))
23579#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_private_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_11(n))
23580#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_private_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_12(n))
23581#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_private_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_13(n))
23582#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_private_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_14(n))
23583#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_module_function_m2, rb_define_module_function_m3)
23584#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_module_function_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m2(n))
23585#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_module_function_00, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m1(n))
23586#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_module_function_01, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_00(n))
23587#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_module_function_02, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_01(n))
23588#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_module_function_03, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_02(n))
23589#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_module_function_04, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_03(n))
23590#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_module_function_05, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_04(n))
23591#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_module_function_06, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_05(n))
23592#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_module_function_07, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_06(n))
23593#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_module_function_08, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_07(n))
23594#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_module_function_09, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_08(n))
23595#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_module_function_10, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_09(n))
23596#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_module_function_11, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_10(n))
23597#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_module_function_12, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_11(n))
23598#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_module_function_13, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_12(n))
23599#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_module_function_14, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_13(n))
23600#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_module_function_15, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_14(n))
23601#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_global_function_m2, rb_define_global_function_m3)
23602#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_global_function_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m2(n))
23603#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_global_function_00, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m1(n))
23604#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_global_function_01, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_00(n))
23605#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_global_function_02, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_01(n))
23606#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_global_function_03, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_02(n))
23607#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_global_function_04, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_03(n))
23608#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_global_function_05, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_04(n))
23609#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_global_function_06, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_05(n))
23610#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_global_function_07, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_06(n))
23611#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_global_function_08, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_07(n))
23612#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_global_function_09, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_08(n))
23613#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_global_function_10, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_09(n))
23614#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_global_function_11, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_10(n))
23615#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_global_function_12, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_11(n))
23616#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_global_function_13, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_12(n))
23617#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_global_function_14, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_13(n))
23618#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_global_function_15, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_14(n))
23619#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_method_id_m2, rb_define_method_id_m3)
23620#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_method_id_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m2(n))
23621#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_method_id_00, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m1(n))
23622#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_method_id_01, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_00(n))
23623#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_method_id_02, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_01(n))
23624#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_method_id_03, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_02(n))
23625#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_method_id_04, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_03(n))
23626#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_method_id_05, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_04(n))
23627#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_method_id_06, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_05(n))
23628#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_method_id_07, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_06(n))
23629#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_method_id_08, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_07(n))
23630#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_method_id_09, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_08(n))
23631#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_method_id_10, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_09(n))
23632#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_method_id_11, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_10(n))
23633#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_method_id_12, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_11(n))
23634#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_method_id_13, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_12(n))
23635#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_method_id_14, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_13(n))
23636#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_method_id_15, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_14(n))
23637#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_method_m2, rb_define_method_m3)
23638#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_method_m2(n))
23639#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_method_m1(n))
23640#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_method_00(n))
23641#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_method_01(n))
23642#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_method_02(n))
23643#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_method_03(n))
23644#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_method_04(n))
23645#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_method_05(n))
23646#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_method_06(n))
23647#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_method_07(n))
23648#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_method_08(n))
23649#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_method_09(n))
23650#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_method_10(n))
23651#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_method_11(n))
23652#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_method_12(n))
23653#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_method_13(n))
23654#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_method_14(n))
23655#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_singleton_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_15(n))
23656#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_protected_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_15(n))
23657#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_private_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_15(n))
23658#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_module_function_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_15(n))
23659#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_global_function_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_15(n))
23660#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_method_id_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_15(n))
23661#define RBIMPL_ANYARGS_DISPATCH_rb_define_method(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_method_15(n))
23662#define RBIMPL_ANYARGS_ATTRSET(sym) RBIMPL_ATTR_MAYBE_UNUSED() RBIMPL_ATTR_NONNULL(()) RBIMPL_ATTR_WEAKREF(sym)
23663#define RBIMPL_ANYARGS_DECL(sym,...) RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m3(__VA_ARGS__, VALUE(*)(ANYARGS), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m2(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m1(__VA_ARGS__, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _00(__VA_ARGS__, VALUE(*)(VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _01(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _02(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _03(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _04(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _05(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _06(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _07(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _08(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _09(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _10(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _11(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _12(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _13(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _14(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _15(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
23664#define rb_define_method(klass,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_method((arity), (func))((klass), (mid), (func), (arity))
23665#define rb_define_method_id(klass,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_method_id((arity), (func))((klass), (mid), (func), (arity))
23666#define rb_define_singleton_method(obj,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method((arity), (func))((obj), (mid), (func), (arity))
23667#define rb_define_protected_method(klass,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method((arity), (func))((klass), (mid), (func), (arity))
23668#define rb_define_private_method(klass,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_private_method((arity), (func))((klass), (mid), (func), (arity))
23669#define rb_define_module_function(mod,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_module_function((arity), (func))((mod), (mid), (func), (arity))
23670#define rb_define_global_function(mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_global_function((arity), (func))((mid), (func), (arity))
23671#define RUBY_METHOD_FUNC(func) (func)
23672#define RBIMPL_ARITHMETIC_H
23673#define RBIMPL_ARITHMETIC_CHAR_H
23674#define RBIMPL_ARITHMETIC_INT_H
23675#define RBIMPL_ARITHMETIC_FIXNUM_H
23676#define FIXABLE RB_FIXABLE
23677#define FIXNUM_MAX RUBY_FIXNUM_MAX
23678#define FIXNUM_MIN RUBY_FIXNUM_MIN
23679#define NEGFIXABLE RB_NEGFIXABLE
23680#define POSFIXABLE RB_POSFIXABLE
23681#define RB_POSFIXABLE(_) ((_) < RUBY_FIXNUM_MAX + 1)
23682#define RB_NEGFIXABLE(_) ((_) >= RUBY_FIXNUM_MIN)
23683#define RB_FIXABLE(_) (RB_POSFIXABLE(_) && RB_NEGFIXABLE(_))
23684#define RUBY_FIXNUM_MAX (LONG_MAX / 2)
23685#define RUBY_FIXNUM_MIN (LONG_MIN / 2)
23686#define RBIMPL_ARITHMETIC_INTPTR_T_H
23687#define rb_int_new rb_int2inum
23688#define rb_uint_new rb_uint2inum
23689#pragma GCC visibility push(default)
23690#pragma GCC visibility pop
23691#define RBIMPL_ARITHMETIC_LONG_H
23692#define RBIMPL_ATTR_ARTIFICIAL_H
23693#define RBIMPL_ATTR_ARTIFICIAL() __attribute__((__artificial__))
23694#define RBIMPL_ATTR_CONSTEXPR_H
23695#define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 0
23696#define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 0
23697#define RBIMPL_ATTR_CONSTEXPR(_)
23698#define RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(_) RBIMPL_ATTR_CONSTEXPR(_)
23699#define RBIMPL_SPECIAL_CONSTS_H
23700#define RBIMPL_ATTR_ENUM_EXTENSIBILITY_H
23701#define RBIMPL_ATTR_ENUM_EXTENSIBILITY(_)
23702#define USE_FLONUM 1
23703#define RTEST RB_TEST
23704#define FIXNUM_P RB_FIXNUM_P
23705#define IMMEDIATE_P RB_IMMEDIATE_P
23706#define NIL_P RB_NIL_P
23707#define SPECIAL_CONST_P RB_SPECIAL_CONST_P
23708#define STATIC_SYM_P RB_STATIC_SYM_P
23709#define Qfalse RUBY_Qfalse
23710#define Qnil RUBY_Qnil
23711#define Qtrue RUBY_Qtrue
23712#define Qundef RUBY_Qundef
23713#define FIXNUM_FLAG RUBY_FIXNUM_FLAG
23714#define FLONUM_FLAG RUBY_FLONUM_FLAG
23715#define FLONUM_MASK RUBY_FLONUM_MASK
23716#define FLONUM_P RB_FLONUM_P
23717#define IMMEDIATE_MASK RUBY_IMMEDIATE_MASK
23718#define SYMBOL_FLAG RUBY_SYMBOL_FLAG
23719#define RB_FIXNUM_P RB_FIXNUM_P
23720#define RB_FLONUM_P RB_FLONUM_P
23721#define RB_IMMEDIATE_P RB_IMMEDIATE_P
23722#define RB_NIL_P RB_NIL_P
23723#define RB_SPECIAL_CONST_P RB_SPECIAL_CONST_P
23724#define RB_STATIC_SYM_P RB_STATIC_SYM_P
23725#define RB_TEST RB_TEST
23726#define RUBY_Qfalse RBIMPL_CAST((VALUE)RUBY_Qfalse)
23727#define RUBY_Qtrue RBIMPL_CAST((VALUE)RUBY_Qtrue)
23728#define RUBY_Qnil RBIMPL_CAST((VALUE)RUBY_Qnil)
23729#define RUBY_Qundef RBIMPL_CAST((VALUE)RUBY_Qundef)
23730#define FIX2LONG RB_FIX2LONG
23731#define FIX2ULONG RB_FIX2ULONG
23732#define INT2FIX RB_INT2FIX
23733#define LONG2FIX RB_INT2FIX
23734#define LONG2NUM RB_LONG2NUM
23735#define NUM2LONG RB_NUM2LONG
23736#define NUM2ULONG RB_NUM2ULONG
23737#define RB_FIX2LONG rb_fix2long
23738#define RB_FIX2ULONG rb_fix2ulong
23739#define RB_LONG2FIX RB_INT2FIX
23740#define RB_LONG2NUM rb_long2num_inline
23741#define RB_NUM2LONG rb_num2long_inline
23742#define RB_NUM2ULONG rb_num2ulong_inline
23743#define RB_ULONG2NUM rb_ulong2num_inline
23744#define ULONG2NUM RB_ULONG2NUM
23745#define rb_fix_new RB_INT2FIX
23746#define rb_long2int rb_long2int_inline
23747#define RB_INT2FIX RB_INT2FIX
23748#pragma GCC visibility push(default)
23749#pragma GCC visibility pop
23750#undef INT2FIX
23751#define INT2FIX(i) __builtin_choose_expr( __builtin_constant_p(i), RBIMPL_CAST((VALUE)(i)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(i))
23752#define RB_INT2NUM rb_int2num_inline
23753#define RB_NUM2INT rb_num2int_inline
23754#define RB_UINT2NUM rb_uint2num_inline
23755#define FIX2INT RB_FIX2INT
23756#define FIX2UINT RB_FIX2UINT
23757#define INT2NUM RB_INT2NUM
23758#define NUM2INT RB_NUM2INT
23759#define NUM2UINT RB_NUM2UINT
23760#define UINT2NUM RB_UINT2NUM
23761#define RB_FIX2INT RB_FIX2INT
23762#define RB_NUM2UINT RB_NUM2UINT
23763#define RB_FIX2UINT RB_FIX2UINT
23764#pragma GCC visibility push(default)
23765#pragma GCC visibility pop
23766#pragma GCC diagnostic push
23767#pragma GCC diagnostic ignored "-Wtype-limits"
23768#pragma GCC diagnostic pop
23769#define RBIMPL_RSTRING_H
23770#define RBIMPL_RBASIC_H
23771#define RBIMPL_ATTR_NOALIAS_H
23772#define RBIMPL_ATTR_NOALIAS()
23773#define RBASIC(obj) RBIMPL_CAST((struct RBasic *)(obj))
23774#define RBASIC_CLASS RBASIC_CLASS
23775#define RBIMPL_RVALUE_EMBED_LEN_MAX 3
23776#define RVALUE_EMBED_LEN_MAX RVALUE_EMBED_LEN_MAX
23777#define RBIMPL_EMBED_LEN_MAX_OF(T) RBIMPL_CAST((int)(sizeof(VALUE[RBIMPL_RVALUE_EMBED_LEN_MAX]) / (sizeof(T))))
23778#pragma GCC visibility push(default)
23779#pragma GCC visibility pop
23780#define RBIMPL_FL_TYPE_H
23781#define RBIMPL_ATTR_FLAG_ENUM_H
23782#define RBIMPL_ATTR_FLAG_ENUM()
23783#define RBIMPL_VALUE_TYPE_H
23784#define RBIMPL_CONSTANT_P_H
23785#define RBIMPL_CONSTANT_P(expr) __builtin_constant_p(expr)
23786#define RBIMPL_ERROR_H
23787#define RB_IO_WAIT_READABLE RB_IO_WAIT_READABLE
23788#define RB_IO_WAIT_WRITABLE RB_IO_WAIT_WRITABLE
23789#pragma GCC visibility push(default)
23790#define ruby_verbose (*rb_ruby_verbose_ptr())
23791#define ruby_debug (*rb_ruby_debug_ptr())
23792#pragma GCC visibility pop
23793#define T_ARRAY RUBY_T_ARRAY
23794#define T_BIGNUM RUBY_T_BIGNUM
23795#define T_CLASS RUBY_T_CLASS
23796#define T_COMPLEX RUBY_T_COMPLEX
23797#define T_DATA RUBY_T_DATA
23798#define T_FALSE RUBY_T_FALSE
23799#define T_FILE RUBY_T_FILE
23800#define T_FIXNUM RUBY_T_FIXNUM
23801#define T_FLOAT RUBY_T_FLOAT
23802#define T_HASH RUBY_T_HASH
23803#define T_ICLASS RUBY_T_ICLASS
23804#define T_IMEMO RUBY_T_IMEMO
23805#define T_MASK RUBY_T_MASK
23806#define T_MATCH RUBY_T_MATCH
23807#define T_MODULE RUBY_T_MODULE
23808#define T_MOVED RUBY_T_MOVED
23809#define T_NIL RUBY_T_NIL
23810#define T_NODE RUBY_T_NODE
23811#define T_NONE RUBY_T_NONE
23812#define T_OBJECT RUBY_T_OBJECT
23813#define T_RATIONAL RUBY_T_RATIONAL
23814#define T_REGEXP RUBY_T_REGEXP
23815#define T_STRING RUBY_T_STRING
23816#define T_STRUCT RUBY_T_STRUCT
23817#define T_SYMBOL RUBY_T_SYMBOL
23818#define T_TRUE RUBY_T_TRUE
23819#define T_UNDEF RUBY_T_UNDEF
23820#define T_ZOMBIE RUBY_T_ZOMBIE
23821#define BUILTIN_TYPE RB_BUILTIN_TYPE
23822#define DYNAMIC_SYM_P RB_DYNAMIC_SYM_P
23823#define RB_INTEGER_TYPE_P rb_integer_type_p
23824#define SYMBOL_P RB_SYMBOL_P
23825#define rb_type_p RB_TYPE_P
23826#define RB_BUILTIN_TYPE RB_BUILTIN_TYPE
23827#define RB_DYNAMIC_SYM_P RB_DYNAMIC_SYM_P
23828#define RB_FLOAT_TYPE_P RB_FLOAT_TYPE_P
23829#define RB_SYMBOL_P RB_SYMBOL_P
23830#define RB_TYPE_P RB_TYPE_P
23831#define Check_Type Check_Type
23832#define RBIMPL_ASSERT_TYPE(v,t) RBIMPL_ASSERT_OR_ASSUME(RB_TYPE_P((v), (t)))
23833#define TYPE(_) RBIMPL_CAST((int)rb_type(_))
23834#pragma GCC visibility push(default)
23835#pragma GCC visibility pop
23836#define RBIMPL_HAVE_ENUM_ATTRIBUTE 1
23837#define RBIMPL_WIDER_ENUM 1
23838#define FL_SINGLETON RBIMPL_CAST((VALUE)RUBY_FL_SINGLETON)
23839#define FL_WB_PROTECTED RBIMPL_CAST((VALUE)RUBY_FL_WB_PROTECTED)
23840#define FL_PROMOTED0 RBIMPL_CAST((VALUE)RUBY_FL_PROMOTED0)
23841#define FL_PROMOTED1 RBIMPL_CAST((VALUE)RUBY_FL_PROMOTED1)
23842#define FL_FINALIZE RBIMPL_CAST((VALUE)RUBY_FL_FINALIZE)
23843#define FL_TAINT RBIMPL_CAST((VALUE)RUBY_FL_TAINT)
23844#define FL_SHAREABLE RBIMPL_CAST((VALUE)RUBY_FL_SHAREABLE)
23845#define FL_UNTRUSTED RBIMPL_CAST((VALUE)RUBY_FL_UNTRUSTED)
23846#define FL_SEEN_OBJ_ID RBIMPL_CAST((VALUE)RUBY_FL_SEEN_OBJ_ID)
23847#define FL_EXIVAR RBIMPL_CAST((VALUE)RUBY_FL_EXIVAR)
23848#define FL_FREEZE RBIMPL_CAST((VALUE)RUBY_FL_FREEZE)
23849#define FL_USHIFT RBIMPL_CAST((VALUE)RUBY_FL_USHIFT)
23850#define FL_USER0 RBIMPL_CAST((VALUE)RUBY_FL_USER0)
23851#define FL_USER1 RBIMPL_CAST((VALUE)RUBY_FL_USER1)
23852#define FL_USER2 RBIMPL_CAST((VALUE)RUBY_FL_USER2)
23853#define FL_USER3 RBIMPL_CAST((VALUE)RUBY_FL_USER3)
23854#define FL_USER4 RBIMPL_CAST((VALUE)RUBY_FL_USER4)
23855#define FL_USER5 RBIMPL_CAST((VALUE)RUBY_FL_USER5)
23856#define FL_USER6 RBIMPL_CAST((VALUE)RUBY_FL_USER6)
23857#define FL_USER7 RBIMPL_CAST((VALUE)RUBY_FL_USER7)
23858#define FL_USER8 RBIMPL_CAST((VALUE)RUBY_FL_USER8)
23859#define FL_USER9 RBIMPL_CAST((VALUE)RUBY_FL_USER9)
23860#define FL_USER10 RBIMPL_CAST((VALUE)RUBY_FL_USER10)
23861#define FL_USER11 RBIMPL_CAST((VALUE)RUBY_FL_USER11)
23862#define FL_USER12 RBIMPL_CAST((VALUE)RUBY_FL_USER12)
23863#define FL_USER13 RBIMPL_CAST((VALUE)RUBY_FL_USER13)
23864#define FL_USER14 RBIMPL_CAST((VALUE)RUBY_FL_USER14)
23865#define FL_USER15 RBIMPL_CAST((VALUE)RUBY_FL_USER15)
23866#define FL_USER16 RBIMPL_CAST((VALUE)RUBY_FL_USER16)
23867#define FL_USER17 RBIMPL_CAST((VALUE)RUBY_FL_USER17)
23868#define FL_USER18 RBIMPL_CAST((VALUE)RUBY_FL_USER18)
23869#define FL_USER19 RBIMPL_CAST((VALUE)(unsigned int)RUBY_FL_USER19)
23870#define ELTS_SHARED RUBY_ELTS_SHARED
23871#define RB_OBJ_FREEZE rb_obj_freeze_inline
23872#define RUBY_ELTS_SHARED RUBY_ELTS_SHARED
23873#define RB_FL_ABLE RB_FL_ABLE
23874#define RB_FL_ALL RB_FL_ALL
23875#define RB_FL_ALL_RAW RB_FL_ALL_RAW
23876#define RB_FL_ANY RB_FL_ANY
23877#define RB_FL_ANY_RAW RB_FL_ANY_RAW
23878#define RB_FL_REVERSE RB_FL_REVERSE
23879#define RB_FL_REVERSE_RAW RB_FL_REVERSE_RAW
23880#define RB_FL_SET RB_FL_SET
23881#define RB_FL_SET_RAW RB_FL_SET_RAW
23882#define RB_FL_TEST RB_FL_TEST
23883#define RB_FL_TEST_RAW RB_FL_TEST_RAW
23884#define RB_FL_UNSET RB_FL_UNSET
23885#define RB_FL_UNSET_RAW RB_FL_UNSET_RAW
23886#define RB_OBJ_FREEZE_RAW RB_OBJ_FREEZE_RAW
23887#define RB_OBJ_FROZEN RB_OBJ_FROZEN
23888#define RB_OBJ_FROZEN_RAW RB_OBJ_FROZEN_RAW
23889#define RB_OBJ_INFECT RB_OBJ_INFECT
23890#define RB_OBJ_INFECT_RAW RB_OBJ_INFECT_RAW
23891#define RB_OBJ_TAINT RB_OBJ_TAINT
23892#define RB_OBJ_TAINTABLE RB_OBJ_TAINTABLE
23893#define RB_OBJ_TAINTED RB_OBJ_TAINTED
23894#define RB_OBJ_TAINTED_RAW RB_OBJ_TAINTED_RAW
23895#define RB_OBJ_TAINT_RAW RB_OBJ_TAINT_RAW
23896#define RB_OBJ_UNTRUST RB_OBJ_TAINT
23897#define RB_OBJ_UNTRUSTED RB_OBJ_TAINTED
23898#define FL_ABLE RB_FL_ABLE
23899#define FL_ALL RB_FL_ALL
23900#define FL_ALL_RAW RB_FL_ALL_RAW
23901#define FL_ANY RB_FL_ANY
23902#define FL_ANY_RAW RB_FL_ANY_RAW
23903#define FL_REVERSE RB_FL_REVERSE
23904#define FL_REVERSE_RAW RB_FL_REVERSE_RAW
23905#define FL_SET RB_FL_SET
23906#define FL_SET_RAW RB_FL_SET_RAW
23907#define FL_TEST RB_FL_TEST
23908#define FL_TEST_RAW RB_FL_TEST_RAW
23909#define FL_UNSET RB_FL_UNSET
23910#define FL_UNSET_RAW RB_FL_UNSET_RAW
23911#define OBJ_FREEZE RB_OBJ_FREEZE
23912#define OBJ_FREEZE_RAW RB_OBJ_FREEZE_RAW
23913#define OBJ_FROZEN RB_OBJ_FROZEN
23914#define OBJ_FROZEN_RAW RB_OBJ_FROZEN_RAW
23915#define OBJ_INFECT RB_OBJ_INFECT
23916#define OBJ_INFECT_RAW RB_OBJ_INFECT_RAW
23917#define OBJ_TAINT RB_OBJ_TAINT
23918#define OBJ_TAINTABLE RB_OBJ_TAINTABLE
23919#define OBJ_TAINTED RB_OBJ_TAINTED
23920#define OBJ_TAINTED_RAW RB_OBJ_TAINTED_RAW
23921#define OBJ_TAINT_RAW RB_OBJ_TAINT_RAW
23922#define OBJ_UNTRUST RB_OBJ_UNTRUST
23923#define OBJ_UNTRUSTED RB_OBJ_UNTRUSTED
23924#define RBIMPL_FL_USER_N(n) RUBY_FL_USER ##n = (1<<(RUBY_FL_USHIFT+n))
23925#undef RBIMPL_FL_USER_N
23926#undef RBIMPL_WIDER_ENUM
23927#undef RBIMPL_HAVE_ENUM_ATTRIBUTE
23928#pragma GCC visibility push(default)
23929#pragma GCC visibility pop
23930#define RSTRING(obj) RBIMPL_CAST((struct RString *)(obj))
23931#define RSTRING_NOEMBED RSTRING_NOEMBED
23932#define RSTRING_FSTR RSTRING_FSTR
23933#define RSTRING_EMBED_LEN RSTRING_EMBED_LEN
23934#define RSTRING_LEN RSTRING_LEN
23935#define RSTRING_LENINT RSTRING_LENINT
23936#define RSTRING_PTR RSTRING_PTR
23937#define RSTRING_END RSTRING_END
23938#define StringValue(v) rb_string_value(&(v))
23939#define StringValuePtr(v) rb_string_value_ptr(&(v))
23940#define StringValueCStr(v) rb_string_value_cstr(&(v))
23941#define SafeStringValue(v) StringValue(v)
23942#define ExportStringValue(v) do { StringValue(v); (v) = rb_str_export(v); } while (0)
23943#pragma GCC visibility push(default)
23944#define Check_SafeStr(v) rb_check_safe_str(RBIMPL_CAST((VALUE)(v)))
23945#pragma GCC visibility pop
23946#pragma GCC diagnostic push
23947#pragma GCC diagnostic pop
23948#define RSTRING_GETMEM(str,ptrvar,lenvar) __extension__ ({ struct RString rbimpl_str = rbimpl_rstring_getmem(str); (ptrvar) = rbimpl_str.as.heap.ptr; (lenvar) = rbimpl_str.as.heap.len; })
23949#define RB_NUM2CHR rb_num2char_inline
23950#define NUM2CHR RB_NUM2CHR
23951#define CHR2FIX RB_CHR2FIX
23952#define RB_CHR2FIX RB_CHR2FIX
23953#define RBIMPL_ARITHMETIC_DOUBLE_H
23954#define NUM2DBL rb_num2dbl
23955#define RFLOAT_VALUE rb_float_value
23956#define DBL2NUM rb_float_new
23957#pragma GCC visibility push(default)
23958#pragma GCC visibility pop
23959#define RBIMPL_ARITHMETIC_GID_T_H
23960#define RBIMPL_ARITHMETIC_LONG_LONG_H
23961#define RB_LL2NUM rb_ll2num_inline
23962#define RB_ULL2NUM rb_ull2num_inline
23963#define LL2NUM RB_LL2NUM
23964#define ULL2NUM RB_ULL2NUM
23965#define RB_NUM2LL rb_num2ll_inline
23966#define RB_NUM2ULL rb_num2ull_inline
23967#define NUM2LL RB_NUM2LL
23968#define NUM2ULL RB_NUM2ULL
23969#pragma GCC visibility push(default)
23970#pragma GCC visibility pop
23971#define RBIMPL_ARITHMETIC_MODE_T_H
23972#define RBIMPL_ARITHMETIC_OFF_T_H
23973#define RBIMPL_ARITHMETIC_PID_T_H
23974#define RBIMPL_ARITHMETIC_SHORT_H
23975#define RB_NUM2SHORT rb_num2short_inline
23976#define RB_NUM2USHORT rb_num2ushort
23977#define NUM2SHORT RB_NUM2SHORT
23978#define NUM2USHORT RB_NUM2USHORT
23979#define USHORT2NUM RB_INT2FIX
23980#define RB_FIX2SHORT rb_fix2short
23981#define FIX2SHORT RB_FIX2SHORT
23982#pragma GCC visibility push(default)
23983#pragma GCC visibility pop
23984#define RBIMPL_ARITHMETIC_SIZE_T_H
23985#define RB_SIZE2NUM RB_ULL2NUM
23986#define RB_SSIZE2NUM RB_LL2NUM
23987#define RB_NUM2SIZE RB_NUM2ULL
23988#define RB_NUM2SSIZE RB_NUM2LL
23989#define NUM2SIZET RB_NUM2SIZE
23990#define SIZET2NUM RB_SIZE2NUM
23991#define NUM2SSIZET RB_NUM2SSIZE
23992#define SSIZET2NUM RB_SSIZE2NUM
23993#define RBIMPL_ARITHMERIC_ST_DATA_T_H
23994#define RUBY_ST_H 1
23995#pragma GCC visibility push(default)
23996#define ST_DATA_T_DEFINED
23997#define MAX_ST_INDEX_VAL (~(st_index_t) 0)
23998#define SIZEOF_ST_INDEX_T SIZEOF_VOIDP
23999#define ST_INDEX_BITS (SIZEOF_ST_INDEX_T * CHAR_BIT)
24000#define ST_DATA_COMPATIBLE_P(type) __builtin_choose_expr(__builtin_types_compatible_p(type, st_data_t), 1, 0)
24001#define st_is_member(table,key) st_lookup((table),(key),(st_data_t *)0)
24002#define st_init_table rb_st_init_table
24003#define st_init_table_with_size rb_st_init_table_with_size
24004#define st_init_numtable rb_st_init_numtable
24005#define st_init_numtable_with_size rb_st_init_numtable_with_size
24006#define st_init_strtable rb_st_init_strtable
24007#define st_init_strtable_with_size rb_st_init_strtable_with_size
24008#define st_init_strcasetable rb_st_init_strcasetable
24009#define st_init_strcasetable_with_size rb_st_init_strcasetable_with_size
24010#define st_delete rb_st_delete
24011#define st_delete_safe rb_st_delete_safe
24012#define st_shift rb_st_shift
24013#define st_insert rb_st_insert
24014#define st_insert2 rb_st_insert2
24015#define st_lookup rb_st_lookup
24016#define st_get_key rb_st_get_key
24017#define st_update rb_st_update
24018#define st_foreach_with_replace rb_st_foreach_with_replace
24019#define st_foreach rb_st_foreach
24020#define st_foreach_check rb_st_foreach_check
24021#define st_keys rb_st_keys
24022#define st_keys_check rb_st_keys_check
24023#define st_values rb_st_values
24024#define st_values_check rb_st_values_check
24025#define st_add_direct rb_st_add_direct
24026#define st_free_table rb_st_free_table
24027#define st_cleanup_safe rb_st_cleanup_safe
24028#define st_clear rb_st_clear
24029#define st_copy rb_st_copy
24030#define st_numcmp rb_st_numcmp
24031#define st_numhash rb_st_numhash
24032#define st_locale_insensitive_strcasecmp rb_st_locale_insensitive_strcasecmp
24033#define st_locale_insensitive_strncasecmp rb_st_locale_insensitive_strncasecmp
24034#define st_strcasecmp rb_st_locale_insensitive_strcasecmp
24035#define st_strncasecmp rb_st_locale_insensitive_strncasecmp
24036#define st_memsize rb_st_memsize
24037#define st_hash rb_st_hash
24038#define st_hash_uint32 rb_st_hash_uint32
24039#define st_hash_uint rb_st_hash_uint
24040#define st_hash_end rb_st_hash_end
24041#define st_hash_start(h) ((st_index_t)(h))
24042#pragma GCC visibility pop
24043#define ST2FIX RB_ST2FIX
24044#define RB_ST2FIX RB_ST2FIX
24045#define RBIMPL_ARITHMETIC_UID_T_H
24046#define RBIMPL_CORE_H
24047#define RBIMPL_RARRAY_H
24048#define RBIMPL_RGENGC_H
24049#undef USE_RGENGC
24050#define USE_RGENGC 1
24051#define USE_RINCGC 1
24052#define USE_RGENGC_LOGGING_WB_UNPROTECT 0
24053#define RGENGC_WB_PROTECTED_ARRAY 1
24054#define RGENGC_WB_PROTECTED_HASH 1
24055#define RGENGC_WB_PROTECTED_STRUCT 1
24056#define RGENGC_WB_PROTECTED_STRING 1
24057#define RGENGC_WB_PROTECTED_OBJECT 1
24058#define RGENGC_WB_PROTECTED_REGEXP 1
24059#define RGENGC_WB_PROTECTED_CLASS 1
24060#define RGENGC_WB_PROTECTED_FLOAT 1
24061#define RGENGC_WB_PROTECTED_COMPLEX 1
24062#define RGENGC_WB_PROTECTED_RATIONAL 1
24063#define RGENGC_WB_PROTECTED_BIGNUM 1
24064#define RGENGC_WB_PROTECTED_NODE_CREF 1
24065#define RB_OBJ_WRITE(old,slot,young) RBIMPL_CAST(rb_obj_write((VALUE)(old), (VALUE *)(slot), (VALUE)(young), __FILE__, __LINE__))
24066#define RB_OBJ_WRITTEN(old,oldv,young) RBIMPL_CAST(rb_obj_written((VALUE)(old), (VALUE)(oldv), (VALUE)(young), __FILE__, __LINE__))
24067#define OBJ_PROMOTED_RAW RB_OBJ_PROMOTED_RAW
24068#define OBJ_PROMOTED RB_OBJ_PROMOTED
24069#define OBJ_WB_UNPROTECT RB_OBJ_WB_UNPROTECT
24070#define RB_OBJ_WB_UNPROTECT(x) rb_obj_wb_unprotect(x, __FILE__, __LINE__)
24071#define RB_OBJ_WB_UNPROTECT_FOR(type,obj) (RGENGC_WB_PROTECTED_ ##type ? OBJ_WB_UNPROTECT(obj) : obj)
24072#define RGENGC_LOGGING_WB_UNPROTECT rb_gc_unprotect_logging
24073#define RB_OBJ_PROMOTED_RAW RB_OBJ_PROMOTED_RAW
24074#define RB_OBJ_PROMOTED RB_OBJ_PROMOTED
24075#pragma GCC visibility push(default)
24076#pragma GCC visibility pop
24077#define USE_TRANSIENT_HEAP 1
24078#define RARRAY(obj) RBIMPL_CAST((struct RArray *)(obj))
24079#define RARRAY_EMBED_FLAG RARRAY_EMBED_FLAG
24080#define RARRAY_EMBED_LEN_MASK RARRAY_EMBED_LEN_MASK
24081#define RARRAY_EMBED_LEN_MAX RARRAY_EMBED_LEN_MAX
24082#define RARRAY_EMBED_LEN_SHIFT RARRAY_EMBED_LEN_SHIFT
24083#define RARRAY_TRANSIENT_FLAG RARRAY_TRANSIENT_FLAG
24084#define RARRAY_LEN rb_array_len
24085#define RARRAY_CONST_PTR rb_array_const_ptr
24086#define RARRAY_CONST_PTR_TRANSIENT rb_array_const_ptr_transient
24087#define FIX_CONST_VALUE_PTR(x) (x)
24088#define RARRAY_EMBED_LEN RARRAY_EMBED_LEN
24089#define RARRAY_LENINT RARRAY_LENINT
24090#define RARRAY_TRANSIENT_P RARRAY_TRANSIENT_P
24091#define RARRAY_ASET RARRAY_ASET
24092#define RARRAY_PTR RARRAY_PTR
24093#pragma GCC visibility push(default)
24094#pragma GCC visibility pop
24095#define RBIMPL_RARRAY_STMT(flag,ary,var,expr) do { RBIMPL_ASSERT_TYPE((ary), RUBY_T_ARRAY); const VALUE rbimpl_ary = (ary); VALUE *var = rb_array_ptr_use_start(rbimpl_ary, (flag)); expr; rb_array_ptr_use_end(rbimpl_ary, (flag)); } while (0)
24096#define RARRAY_PTR_USE_START(a) rb_array_ptr_use_start(a, 0)
24097#define RARRAY_PTR_USE_END(a) rb_array_ptr_use_end(a, 0)
24098#define RARRAY_PTR_USE(ary,ptr_name,expr) RBIMPL_RARRAY_STMT(0, ary, ptr_name, expr)
24099#define RARRAY_PTR_USE_START_TRANSIENT(a) rb_array_ptr_use_start(a, 1)
24100#define RARRAY_PTR_USE_END_TRANSIENT(a) rb_array_ptr_use_end(a, 1)
24101#define RARRAY_PTR_USE_TRANSIENT(ary,ptr_name,expr) RBIMPL_RARRAY_STMT(1, ary, ptr_name, expr)
24102#define RARRAY_AREF(a,i) RARRAY_CONST_PTR_TRANSIENT(a)[i]
24103#define RBIMPL_RBIGNUM_H
24104#define RBIGNUM_SIGN rb_big_sign
24105#define RBIGNUM_POSITIVE_P RBIGNUM_POSITIVE_P
24106#define RBIGNUM_NEGATIVE_P RBIGNUM_NEGATIVE_P
24107#pragma GCC visibility push(default)
24108#pragma GCC visibility pop
24109#define RBIMPL_RCLASS_H
24110#define RMODULE_IS_REFINEMENT RMODULE_IS_REFINEMENT
24111#define RCLASS(obj) RBIMPL_CAST((struct RClass *)(obj))
24112#define RMODULE RCLASS
24113#define RCLASS_SUPER rb_class_get_superclass
24114#pragma GCC visibility push(default)
24115#pragma GCC visibility pop
24116#define RBIMPL_RDATA_H
24117#define RUBY_UNTYPED_DATA_WARNING 1
24118#define RBIMPL_DATA_FUNC(f) RBIMPL_CAST((void (*)(void *))(f))
24119#define RBIMPL_ATTRSET_UNTYPED_DATA_FUNC() RBIMPL_ATTR_WARNING(("untyped Data is unsafe; use TypedData instead")) RBIMPL_ATTR_DEPRECATED(("by TypedData"))
24120#define RBIMPL_MACRO_SELECT(x,y) x ## y
24121#define RUBY_MACRO_SELECT(x,y) RBIMPL_MACRO_SELECT(x, y)
24122#define RDATA(obj) RBIMPL_CAST((struct RData *)(obj))
24123#define DATA_PTR(obj) RDATA(obj)->data
24124#define RUBY_DEFAULT_FREE RBIMPL_DATA_FUNC(-1)
24125#define RUBY_NEVER_FREE RBIMPL_DATA_FUNC(0)
24126#define RUBY_UNTYPED_DATA_FUNC(f) f RBIMPL_ATTRSET_UNTYPED_DATA_FUNC()
24127#pragma GCC visibility push(default)
24128#pragma GCC visibility pop
24129#define Data_Wrap_Struct(klass,mark,free,sval) rb_data_object_wrap( (klass), (sval), RBIMPL_DATA_FUNC(mark), RBIMPL_DATA_FUNC(free))
24130#define Data_Make_Struct0(result,klass,type,size,mark,free,sval) VALUE result = rb_data_object_zalloc( (klass), (size), RBIMPL_DATA_FUNC(mark), RBIMPL_DATA_FUNC(free)); (sval) = RBIMPL_CAST((type *)DATA_PTR(result)); RBIMPL_CAST( (void)(sval))
24131#define Data_Make_Struct(klass,type,mark,free,sval) RB_GNUC_EXTENSION({ Data_Make_Struct0( data_struct_obj, klass, type, sizeof(type), mark, free, sval); data_struct_obj; })
24132#define Data_Get_Struct(obj,type,sval) ((sval) = RBIMPL_CAST((type*)rb_data_object_get(obj)))
24133#define rb_data_object_wrap_warning(klass,ptr,mark,free) RB_GNUC_EXTENSION( __builtin_choose_expr( __builtin_constant_p(klass) && !(klass), rb_data_object_wrap(klass, ptr, mark, free), (rb_data_object_wrap_warning)(klass, ptr, mark, free)))
24134#define rb_data_object_wrap_0 rb_data_object_wrap
24135#define rb_data_object_wrap_1 rb_data_object_wrap_warning
24136#define rb_data_object_wrap_2 rb_data_object_wrap_
24137#define rb_data_object_wrap RUBY_MACRO_SELECT(rb_data_object_wrap_2, RUBY_UNTYPED_DATA_WARNING)
24138#define rb_data_object_get_0 rb_data_object_get
24139#define rb_data_object_get_1 rb_data_object_get_warning
24140#define rb_data_object_get_2 rb_data_object_get_
24141#define rb_data_object_get RUBY_MACRO_SELECT(rb_data_object_get_2, RUBY_UNTYPED_DATA_WARNING)
24142#define rb_data_object_make_0 rb_data_object_make
24143#define rb_data_object_make_1 rb_data_object_make_warning
24144#define rb_data_object_make_2 rb_data_object_make_
24145#define rb_data_object_make RUBY_MACRO_SELECT(rb_data_object_make_2, RUBY_UNTYPED_DATA_WARNING)
24146#define RBIMPL_RFILE_H
24147#define RFILE(obj) RBIMPL_CAST((struct RFile *)(obj))
24148#define RBIMPL_RHASH_H
24149#define RHASH_TBL(h) rb_hash_tbl(h, __FILE__, __LINE__)
24150#define RHASH_ITER_LEV(h) rb_hash_iter_lev(h)
24151#define RHASH_IFNONE(h) rb_hash_ifnone(h)
24152#define RHASH_SIZE(h) rb_hash_size_num(h)
24153#define RHASH_EMPTY_P(h) (RHASH_SIZE(h) == 0)
24154#define RHASH_SET_IFNONE(h,ifnone) rb_hash_set_ifnone((VALUE)h, ifnone)
24155#pragma GCC visibility push(default)
24156#pragma GCC visibility pop
24157#define RBIMPL_ROBJECT_H
24158#define ROBJECT(obj) RBIMPL_CAST((struct RObject *)(obj))
24159#define ROBJECT_EMBED_LEN_MAX ROBJECT_EMBED_LEN_MAX
24160#define ROBJECT_EMBED ROBJECT_EMBED
24161#define ROBJECT_NUMIV ROBJECT_NUMIV
24162#define ROBJECT_IVPTR ROBJECT_IVPTR
24163#define ROBJECT_IV_INDEX_TBL ROBJECT_IV_INDEX_TBL
24164#define RBIMPL_RREGEXP_H
24165#define RREGEXP(obj) RBIMPL_CAST((struct RRegexp *)(obj))
24166#define RREGEXP_PTR(obj) (RREGEXP(obj)->ptr)
24167#define RREGEXP_SRC RREGEXP_SRC
24168#define RREGEXP_SRC_PTR RREGEXP_SRC_PTR
24169#define RREGEXP_SRC_LEN RREGEXP_SRC_LEN
24170#define RREGEXP_SRC_END RREGEXP_SRC_END
24171#define RBIMPL_RSTRUCT_H
24172#define RSTRUCT_PTR(st) rb_struct_ptr(st)
24173#define RSTRUCT_LEN RSTRUCT_LEN
24174#define RSTRUCT_SET RSTRUCT_SET
24175#define RSTRUCT_GET RSTRUCT_GET
24176#pragma GCC visibility push(default)
24177#pragma GCC visibility pop
24178#define RBIMPL_RTYPEDDATA_H
24179#define HAVE_TYPE_RB_DATA_TYPE_T 1
24180#define HAVE_RB_DATA_TYPE_T_FUNCTION 1
24181#define HAVE_RB_DATA_TYPE_T_PARENT 1
24182#define RUBY_TYPED_DEFAULT_FREE RUBY_DEFAULT_FREE
24183#define RUBY_TYPED_NEVER_FREE RUBY_NEVER_FREE
24184#define RTYPEDDATA(obj) RBIMPL_CAST((struct RTypedData *)(obj))
24185#define RTYPEDDATA_DATA(v) (RTYPEDDATA(v)->data)
24186#define Check_TypedStruct(v,t) rb_check_typeddata(RBIMPL_CAST((VALUE)(v)), (t))
24187#define RTYPEDDATA_P RTYPEDDATA_P
24188#define RTYPEDDATA_TYPE RTYPEDDATA_TYPE
24189#define RUBY_TYPED_FREE_IMMEDIATELY RUBY_TYPED_FREE_IMMEDIATELY
24190#define RUBY_TYPED_FROZEN_SHAREABLE RUBY_TYPED_FROZEN_SHAREABLE
24191#define RUBY_TYPED_WB_PROTECTED RUBY_TYPED_WB_PROTECTED
24192#define RUBY_TYPED_PROMOTED1 RUBY_TYPED_PROMOTED1
24193#pragma GCC visibility push(default)
24194#pragma GCC visibility pop
24195#define TypedData_Wrap_Struct(klass,data_type,sval) rb_data_typed_object_wrap((klass),(sval),(data_type))
24196#define TypedData_Make_Struct0(result,klass,type,size,data_type,sval) VALUE result = rb_data_typed_object_zalloc(klass, size, data_type); (sval) = RBIMPL_CAST((type *)RTYPEDDATA_DATA(result)); RBIMPL_CAST( (void)(sval))
24197#define TypedData_Make_Struct(klass,type,data_type,sval) RB_GNUC_EXTENSION({ TypedData_Make_Struct0( data_struct_obj, klass, type, sizeof(type), data_type, sval); data_struct_obj; })
24198#define TypedData_Get_Struct(obj,type,data_type,sval) ((sval) = RBIMPL_CAST((type *)rb_check_typeddata((obj), (data_type))))
24199#define RBIMPL_CTYPE_H
24200#define _CTYPE_H 1
24201#define _ISbit(bit) ((bit) < 8 ? ((1 << (bit)) << 8) : ((1 << (bit)) >> 8))
24202#define __isctype(c,type) ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type)
24203#define __isascii(c) (((c) & ~0x7f) == 0)
24204#define __toascii(c) ((c) & 0x7f)
24205#define __exctype(name) extern int name (int) __THROW
24206#define __tobody(c,f,a,args) (__extension__ ({ int __res; if (sizeof (c) > 1) { if (__builtin_constant_p (c)) { int __c = (c); __res = __c < -128 || __c > 255 ? __c : (a)[__c]; } else __res = f args; } else __res = (a)[(int) (c)]; __res; }))
24207#define isalnum(c) __isctype((c), _ISalnum)
24208#define isalpha(c) __isctype((c), _ISalpha)
24209#define iscntrl(c) __isctype((c), _IScntrl)
24210#define isdigit(c) __isctype((c), _ISdigit)
24211#define islower(c) __isctype((c), _ISlower)
24212#define isgraph(c) __isctype((c), _ISgraph)
24213#define isprint(c) __isctype((c), _ISprint)
24214#define ispunct(c) __isctype((c), _ISpunct)
24215#define isspace(c) __isctype((c), _ISspace)
24216#define isupper(c) __isctype((c), _ISupper)
24217#define isxdigit(c) __isctype((c), _ISxdigit)
24218#define isblank(c) __isctype((c), _ISblank)
24219#define tolower(c) __tobody (c, tolower, *__ctype_tolower_loc (), (c))
24220#define toupper(c) __tobody (c, toupper, *__ctype_toupper_loc (), (c))
24221#define isascii(c) __isascii (c)
24222#define toascii(c) __toascii (c)
24223#define _tolower(c) ((int) (*__ctype_tolower_loc ())[(int) (c)])
24224#define _toupper(c) ((int) (*__ctype_toupper_loc ())[(int) (c)])
24225#define __isctype_l(c,type,locale) ((locale)->__ctype_b[(int) (c)] & (unsigned short int) type)
24226#define __exctype_l(name) extern int name (int, locale_t) __THROW
24227#define __tolower_l(c,locale) __tobody (c, __tolower_l, (locale)->__ctype_tolower, (c, locale))
24228#define __toupper_l(c,locale) __tobody (c, __toupper_l, (locale)->__ctype_toupper, (c, locale))
24229#define tolower_l(c,locale) __tolower_l ((c), (locale))
24230#define toupper_l(c,locale) __toupper_l ((c), (locale))
24231#define __isalnum_l(c,l) __isctype_l((c), _ISalnum, (l))
24232#define __isalpha_l(c,l) __isctype_l((c), _ISalpha, (l))
24233#define __iscntrl_l(c,l) __isctype_l((c), _IScntrl, (l))
24234#define __isdigit_l(c,l) __isctype_l((c), _ISdigit, (l))
24235#define __islower_l(c,l) __isctype_l((c), _ISlower, (l))
24236#define __isgraph_l(c,l) __isctype_l((c), _ISgraph, (l))
24237#define __isprint_l(c,l) __isctype_l((c), _ISprint, (l))
24238#define __ispunct_l(c,l) __isctype_l((c), _ISpunct, (l))
24239#define __isspace_l(c,l) __isctype_l((c), _ISspace, (l))
24240#define __isupper_l(c,l) __isctype_l((c), _ISupper, (l))
24241#define __isxdigit_l(c,l) __isctype_l((c), _ISxdigit, (l))
24242#define __isblank_l(c,l) __isctype_l((c), _ISblank, (l))
24243#define __isascii_l(c,l) ((l), __isascii (c))
24244#define __toascii_l(c,l) ((l), __toascii (c))
24245#define isalnum_l(c,l) __isalnum_l ((c), (l))
24246#define isalpha_l(c,l) __isalpha_l ((c), (l))
24247#define iscntrl_l(c,l) __iscntrl_l ((c), (l))
24248#define isdigit_l(c,l) __isdigit_l ((c), (l))
24249#define islower_l(c,l) __islower_l ((c), (l))
24250#define isgraph_l(c,l) __isgraph_l ((c), (l))
24251#define isprint_l(c,l) __isprint_l ((c), (l))
24252#define ispunct_l(c,l) __ispunct_l ((c), (l))
24253#define isspace_l(c,l) __isspace_l ((c), (l))
24254#define isupper_l(c,l) __isupper_l ((c), (l))
24255#define isxdigit_l(c,l) __isxdigit_l ((c), (l))
24256#define isblank_l(c,l) __isblank_l ((c), (l))
24257#define isascii_l(c,l) __isascii_l ((c), (l))
24258#define toascii_l(c,l) __toascii_l ((c), (l))
24259#define ISASCII rb_isascii
24260#define ISPRINT rb_isprint
24261#define ISGRAPH rb_isgraph
24262#define ISSPACE rb_isspace
24263#define ISUPPER rb_isupper
24264#define ISLOWER rb_islower
24265#define ISALNUM rb_isalnum
24266#define ISALPHA rb_isalpha
24267#define ISDIGIT rb_isdigit
24268#define ISXDIGIT rb_isxdigit
24269#define ISBLANK rb_isblank
24270#define ISCNTRL rb_iscntrl
24271#define ISPUNCT rb_ispunct
24272#define TOUPPER rb_toupper
24273#define TOLOWER rb_tolower
24274#define STRCASECMP st_locale_insensitive_strcasecmp
24275#define STRNCASECMP st_locale_insensitive_strncasecmp
24276#define STRTOUL ruby_strtoul
24277#pragma GCC visibility push(default)
24278#pragma GCC visibility pop
24279#define RBIMPL_EVAL_H
24280#pragma GCC visibility push(default)
24281#define rb_funcall2 rb_funcallv
24282#define rb_funcall3 rb_funcallv_public
24283#pragma GCC visibility pop
24284#define RBIMPL_EVENT_H
24285#define RUBY_EVENT_NONE 0x0000
24286#define RUBY_EVENT_LINE 0x0001
24287#define RUBY_EVENT_CLASS 0x0002
24288#define RUBY_EVENT_END 0x0004
24289#define RUBY_EVENT_CALL 0x0008
24290#define RUBY_EVENT_RETURN 0x0010
24291#define RUBY_EVENT_C_CALL 0x0020
24292#define RUBY_EVENT_C_RETURN 0x0040
24293#define RUBY_EVENT_RAISE 0x0080
24294#define RUBY_EVENT_ALL 0x00ff
24295#define RUBY_EVENT_B_CALL 0x0100
24296#define RUBY_EVENT_B_RETURN 0x0200
24297#define RUBY_EVENT_THREAD_BEGIN 0x0400
24298#define RUBY_EVENT_THREAD_END 0x0800
24299#define RUBY_EVENT_FIBER_SWITCH 0x1000
24300#define RUBY_EVENT_SCRIPT_COMPILED 0x2000
24301#define RUBY_EVENT_TRACEPOINT_ALL 0xffff
24302#define RUBY_EVENT_RESERVED_FOR_INTERNAL_USE 0x030000
24303#define RUBY_INTERNAL_EVENT_SWITCH 0x040000
24304#define RUBY_EVENT_SWITCH 0x040000
24305#define RUBY_INTERNAL_EVENT_NEWOBJ 0x100000
24306#define RUBY_INTERNAL_EVENT_FREEOBJ 0x200000
24307#define RUBY_INTERNAL_EVENT_GC_START 0x400000
24308#define RUBY_INTERNAL_EVENT_GC_END_MARK 0x800000
24309#define RUBY_INTERNAL_EVENT_GC_END_SWEEP 0x1000000
24310#define RUBY_INTERNAL_EVENT_GC_ENTER 0x2000000
24311#define RUBY_INTERNAL_EVENT_GC_EXIT 0x4000000
24312#define RUBY_INTERNAL_EVENT_OBJSPACE_MASK 0x7f00000
24313#define RUBY_INTERNAL_EVENT_MASK 0xffff0000
24314#define RB_EVENT_HOOKS_HAVE_CALLBACK_DATA 1
24315#pragma GCC visibility push(default)
24316#pragma GCC visibility pop
24317#define RBIMPL_GC_H
24318#pragma GCC visibility push(default)
24319#pragma GCC visibility pop
24320#define RBIMPL_GLOB_H
24321#pragma GCC visibility push(default)
24322#pragma GCC visibility pop
24323#define RBIMPL_GLOBALS_H
24324#pragma GCC visibility push(default)
24325#define RUBY_INTEGER_UNIFICATION 1
24326#define CLASS_OF rb_class_of
24327#pragma GCC visibility pop
24328#define RBIMPL_INTERPRETER_H
24329#pragma GCC visibility push(default)
24330#define RUBY_INIT_STACK VALUE variable_in_this_stack_frame; ruby_init_stack(&variable_in_this_stack_frame);
24331#pragma GCC visibility pop
24332#define RBIMPL_ITERATOR_H
24333#pragma GCC visibility push(default)
24334#define RB_BLOCK_CALL_FUNC_STRICT 1
24335#define RUBY_BLOCK_CALL_FUNC_TAKES_BLOCKARG 1
24336#define RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg,callback_arg) VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg
24337#pragma GCC visibility pop
24338#define RBIMPL_MEMORY_H
24339#define DSIZE_T uint128_t
24340#define RUBY_ALLOCV_LIMIT 1024
24341#define RB_GC_GUARD(v) (*__extension__ ({ volatile VALUE *rb_gc_guarded_ptr = &(v); __asm__("" : : "m"(rb_gc_guarded_ptr)); rb_gc_guarded_ptr; }))
24342#define RB_ALLOC_N(type,n) RBIMPL_CAST((type *)ruby_xmalloc2((n), sizeof(type)))
24343#define RB_ALLOC(type) RBIMPL_CAST((type *)ruby_xmalloc(sizeof(type)))
24344#define RB_ZALLOC_N(type,n) RBIMPL_CAST((type *)ruby_xcalloc((n), sizeof(type)))
24345#define RB_ZALLOC(type) (RB_ZALLOC_N(type, 1))
24346#define RB_REALLOC_N(var,type,n) ((var) = RBIMPL_CAST((type *)ruby_xrealloc2((void *)(var), (n), sizeof(type))))
24347#define ALLOCA_N(type,n) RBIMPL_CAST((type *)alloca(rbimpl_size_mul_or_raise(sizeof(type), (n))))
24348#define RB_ALLOCV(v,n) ((n) < RUBY_ALLOCV_LIMIT ? ((v) = 0, alloca(n)) : rb_alloc_tmp_buffer(&(v), (n)))
24349#define RB_ALLOCV_N(type,v,n) RBIMPL_CAST((type *) (((size_t)(n) < RUBY_ALLOCV_LIMIT / sizeof(type)) ? ((v) = 0, alloca((n) * sizeof(type))) : rb_alloc_tmp_buffer2(&(v), (n), sizeof(type))))
24350#define RB_ALLOCV_END(v) rb_free_tmp_buffer(&(v))
24351#define MEMZERO(p,type,n) memset((p), 0, rbimpl_size_mul_or_raise(sizeof(type), (n)))
24352#define MEMCPY(p1,p2,type,n) memcpy((p1), (p2), rbimpl_size_mul_or_raise(sizeof(type), (n)))
24353#define MEMMOVE(p1,p2,type,n) memmove((p1), (p2), rbimpl_size_mul_or_raise(sizeof(type), (n)))
24354#define MEMCMP(p1,p2,type,n) memcmp((p1), (p2), rbimpl_size_mul_or_raise(sizeof(type), (n)))
24355#define ALLOC_N RB_ALLOC_N
24356#define ALLOC RB_ALLOC
24357#define ZALLOC_N RB_ZALLOC_N
24358#define ZALLOC RB_ZALLOC
24359#define REALLOC_N RB_REALLOC_N
24360#define ALLOCV RB_ALLOCV
24361#define ALLOCV_N RB_ALLOCV_N
24362#define ALLOCV_END RB_ALLOCV_END
24363#pragma GCC visibility push(default)
24364#pragma GCC visibility pop
24365#pragma GCC visibility push(default)
24366#pragma GCC visibility pop
24367#undef memcpy
24368#define memcpy ruby_nonempty_memcpy
24369#define RBIMPL_MODULE_H
24370#pragma GCC visibility push(default)
24371#pragma GCC visibility pop
24372#define RBIMPL_NEWOBJ_H
24373#define RB_NEWOBJ(obj,type) type *(obj) = RBIMPL_CAST((type *)rb_newobj())
24374#define RB_NEWOBJ_OF(obj,type,klass,flags) type *(obj) = RBIMPL_CAST((type *)rb_newobj_of(klass, flags))
24375#define NEWOBJ RB_NEWOBJ
24376#define NEWOBJ_OF RB_NEWOBJ_OF
24377#define OBJSETUP rb_obj_setup
24378#define CLONESETUP rb_clone_setup
24379#define DUPSETUP rb_dup_setup
24380#pragma GCC visibility push(default)
24381#pragma GCC visibility pop
24382#define RBIMPL_SCAN_ARGS_H
24383#define RBIMPL_ATTR_DIAGNOSE_IF_H
24384#define RBIMPL_ATTR_DIAGNOSE_IF(_,__,___)
24385#define RBIMPL_INTERN_ARRAY_H
24386#pragma GCC visibility push(default)
24387#define rb_ary_new2 rb_ary_new_capa
24388#define rb_ary_new3 rb_ary_new_from_args
24389#define rb_ary_new4 rb_ary_new_from_values
24390#pragma GCC visibility pop
24391#define RBIMPL_INTERN_ERROR_H
24392#define UNLIMITED_ARGUMENTS (-1)
24393#define rb_exc_new2 rb_exc_new_cstr
24394#define rb_exc_new3 rb_exc_new_str
24395#define rb_check_arity rb_check_arity
24396#pragma GCC visibility push(default)
24397#pragma GCC visibility pop
24398#define rb_check_frozen_internal(obj) do { VALUE frozen_obj = (obj); if (RB_UNLIKELY(RB_OBJ_FROZEN(frozen_obj))) { rb_error_frozen_object(frozen_obj); } } while (0)
24399#define rb_check_frozen rb_check_frozen_inline
24400#define RBIMPL_INTERN_HASH_H
24401#pragma GCC visibility push(default)
24402#define st_foreach_safe rb_st_foreach_safe
24403#pragma GCC visibility pop
24404#define RBIMPL_INTERN_PROC_H
24405#pragma GCC visibility push(default)
24406#pragma GCC visibility pop
24407#define RB_SCAN_ARGS_PASS_CALLED_KEYWORDS 0
24408#define RB_SCAN_ARGS_KEYWORDS 1
24409#define RB_SCAN_ARGS_LAST_HASH_KEYWORDS 3
24410#define RB_NO_KEYWORDS 0
24411#define RB_PASS_KEYWORDS 1
24412#define RB_PASS_CALLED_KEYWORDS rb_keyword_given_p()
24413#define HAVE_RB_SCAN_ARGS_OPTIONAL_HASH 1
24414#pragma GCC visibility push(default)
24415#pragma GCC visibility pop
24416#define rb_scan_args_isdigit(c) (RBIMPL_CAST((unsigned char)((c)-'0'))<10)
24417#define rb_scan_args_count_end(fmt,ofs,vari) ((fmt)[ofs] ? -1 : (vari))
24418#define rb_scan_args_count_block(fmt,ofs,vari) ((fmt)[ofs]!='&' ? rb_scan_args_count_end(fmt, ofs, vari) : rb_scan_args_count_end(fmt, (ofs)+1, (vari)+1))
24419#define rb_scan_args_count_hash(fmt,ofs,vari) ((fmt)[ofs]!=':' ? rb_scan_args_count_block(fmt, ofs, vari) : rb_scan_args_count_block(fmt, (ofs)+1, (vari)+1))
24420#define rb_scan_args_count_trail(fmt,ofs,vari) (!rb_scan_args_isdigit((fmt)[ofs]) ? rb_scan_args_count_hash(fmt, ofs, vari) : rb_scan_args_count_hash(fmt, (ofs)+1, (vari)+((fmt)[ofs]-'0')))
24421#define rb_scan_args_count_var(fmt,ofs,vari) ((fmt)[ofs]!='*' ? rb_scan_args_count_trail(fmt, ofs, vari) : rb_scan_args_count_trail(fmt, (ofs)+1, (vari)+1))
24422#define rb_scan_args_count_opt(fmt,ofs,vari) (!rb_scan_args_isdigit((fmt)[ofs]) ? rb_scan_args_count_var(fmt, ofs, vari) : rb_scan_args_count_var(fmt, (ofs)+1, (vari)+(fmt)[ofs]-'0'))
24423#define rb_scan_args_count_lead(fmt,ofs,vari) (!rb_scan_args_isdigit((fmt)[ofs]) ? rb_scan_args_count_var(fmt, ofs, vari) : rb_scan_args_count_opt(fmt, (ofs)+1, (vari)+(fmt)[ofs]-'0'))
24424#define rb_scan_args_count(fmt) rb_scan_args_count_lead(fmt, 0, 0)
24425#define rb_scan_args_verify(fmt,varc) (sizeof(char[1-2*(rb_scan_args_count(fmt)<0)])!=1 ? rb_scan_args_bad_format(fmt) : sizeof(char[1-2*(rb_scan_args_count(fmt)!=(varc))])!=1 ? rb_scan_args_length_mismatch(fmt, varc) : RBIMPL_ASSERT_NOTHING)
24426#define rb_scan_args0(argc,argv,fmt,varc,vars) rb_scan_args_set(RB_SCAN_ARGS_PASS_CALLED_KEYWORDS, argc, argv, rb_scan_args_n_lead(fmt), rb_scan_args_n_opt(fmt), rb_scan_args_n_trail(fmt), rb_scan_args_f_var(fmt), rb_scan_args_f_hash(fmt), rb_scan_args_f_block(fmt), (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
24427#define rb_scan_args_kw0(kw_flag,argc,argv,fmt,varc,vars) rb_scan_args_set(kw_flag, argc, argv, rb_scan_args_n_lead(fmt), rb_scan_args_n_opt(fmt), rb_scan_args_n_trail(fmt), rb_scan_args_f_var(fmt), rb_scan_args_f_hash(fmt), rb_scan_args_f_block(fmt), (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
24428#define rb_scan_args_next_param() vars[vari++]
24429#undef rb_scan_args_next_param
24430#define rb_scan_args(argc,argvp,fmt,...) __builtin_choose_expr( __builtin_constant_p(fmt), rb_scan_args0( argc, argvp, fmt, (sizeof((VALUE*[]){__VA_ARGS__})/sizeof(VALUE*)), ((VALUE*[]){__VA_ARGS__})), (rb_scan_args)(argc, argvp, fmt __VA_OPT__(, __VA_ARGS__)))
24431#define rb_scan_args_kw(kw_flag,argc,argvp,fmt,...) __builtin_choose_expr( __builtin_constant_p(fmt), rb_scan_args_kw0( kw_flag, argc, argvp, fmt, (sizeof((VALUE*[]){__VA_ARGS__})/sizeof(VALUE*)), ((VALUE*[]){__VA_ARGS__})), (rb_scan_args_kw)(kw_flag, argc, argvp, fmt __VA_OPT__(, __VA_ARGS__)))
24432#define RBIMPL_SYMBOL_H
24433#define RB_ID2SYM rb_id2sym
24434#define RB_SYM2ID rb_sym2id
24435#define ID2SYM RB_ID2SYM
24436#define SYM2ID RB_SYM2ID
24437#define CONST_ID_CACHE RUBY_CONST_ID_CACHE
24438#define CONST_ID RUBY_CONST_ID
24439#define rb_intern_const rb_intern_const
24440#pragma GCC visibility push(default)
24441#pragma GCC visibility pop
24442#define RUBY_CONST_ID_CACHE(result,str) { static ID rb_intern_id_cache; rbimpl_intern_const(&rb_intern_id_cache, (str)); result rb_intern_id_cache; }
24443#define RUBY_CONST_ID(var,str) do { static ID rbimpl_id; (var) = rbimpl_intern_const(&rbimpl_id, (str)); } while (0)
24444#define rb_intern(str) (RBIMPL_CONSTANT_P(str) ? __extension__ ({ static ID rbimpl_id; rbimpl_intern_const(&rbimpl_id, (str)); }) : (rb_intern)(str))
24445#define RBIMPL_VARIABLE_H
24446#pragma GCC visibility push(default)
24447#pragma GCC visibility pop
24448#define RUBY_BACKWARD2_INTTYPES_H
24449#define PRI_INT_PREFIX ""
24450#define PRI_LONG_PREFIX "l"
24451#define PRI_SHORT_PREFIX "h"
24452#define PRI_64_PREFIX PRI_LONG_PREFIX
24453#define RUBY_PRI_VALUE_MARK "\v"
24454#define PRIdVALUE PRI_VALUE_PREFIX"d"
24455#define PRIoVALUE PRI_VALUE_PREFIX"o"
24456#define PRIuVALUE PRI_VALUE_PREFIX"u"
24457#define PRIxVALUE PRI_VALUE_PREFIX"x"
24458#define PRIXVALUE PRI_VALUE_PREFIX"X"
24459#define PRIsVALUE PRI_VALUE_PREFIX"i" RUBY_PRI_VALUE_MARK
24460#define PRIdPTRDIFF PRI_PTRDIFF_PREFIX"d"
24461#define PRIiPTRDIFF PRI_PTRDIFF_PREFIX"i"
24462#define PRIoPTRDIFF PRI_PTRDIFF_PREFIX"o"
24463#define PRIuPTRDIFF PRI_PTRDIFF_PREFIX"u"
24464#define PRIxPTRDIFF PRI_PTRDIFF_PREFIX"x"
24465#define PRIXPTRDIFF PRI_PTRDIFF_PREFIX"X"
24466#define PRIdSIZE PRI_SIZE_PREFIX"d"
24467#define PRIiSIZE PRI_SIZE_PREFIX"i"
24468#define PRIoSIZE PRI_SIZE_PREFIX"o"
24469#define PRIuSIZE PRI_SIZE_PREFIX"u"
24470#define PRIxSIZE PRI_SIZE_PREFIX"x"
24471#define PRIXSIZE PRI_SIZE_PREFIX"X"
24472#pragma GCC visibility push(default)
24473#define USE_SYMBOL_AS_METHOD_NAME 1
24474#define FilePathValue(v) (RB_GC_GUARD(v) = rb_get_path(v))
24475#define FilePathStringValue(v) ((v) = rb_get_path(v))
24476#define rb_varargs_argc_check_runtime(argc,vargc) (((argc) <= (vargc)) ? (argc) : (rb_fatal("argc(%d) exceeds actual arguments(%d)", argc, vargc), 0))
24477#define rb_varargs_argc_valid_p(argc,vargc) ((argc) == 0 ? (vargc) <= 1 : (argc) == (vargc))
24478#define rb_varargs_argc_check(argc,vargc) __builtin_choose_expr(__builtin_constant_p(argc), (rb_varargs_argc_valid_p(argc, vargc) ? (argc) : rb_varargs_bad_length(argc, vargc)), rb_varargs_argc_check_runtime(argc, vargc))
24479#define RUBY_INTERN_H 1
24480#define RBIMPL_INTERN_BIGNUM_H
24481#pragma GCC visibility push(default)
24482#define rb_big2int(x) rb_big2long(x)
24483#define rb_big2uint(x) rb_big2ulong(x)
24484#define INTEGER_PACK_MSWORD_FIRST 0x01
24485#define INTEGER_PACK_LSWORD_FIRST 0x02
24486#define INTEGER_PACK_MSBYTE_FIRST 0x10
24487#define INTEGER_PACK_LSBYTE_FIRST 0x20
24488#define INTEGER_PACK_NATIVE_BYTE_ORDER 0x40
24489#define INTEGER_PACK_2COMP 0x80
24490#define INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION 0x400
24491#define INTEGER_PACK_FORCE_BIGNUM 0x100
24492#define INTEGER_PACK_NEGATIVE 0x200
24493#define INTEGER_PACK_LITTLE_ENDIAN (INTEGER_PACK_LSWORD_FIRST | INTEGER_PACK_LSBYTE_FIRST)
24494#define INTEGER_PACK_BIG_ENDIAN (INTEGER_PACK_MSWORD_FIRST | INTEGER_PACK_MSBYTE_FIRST)
24495#pragma GCC visibility pop
24496#define RBIMPL_INTERN_COMPAR_H
24497#pragma GCC visibility push(default)
24498#pragma GCC visibility pop
24499#define RBIMPL_INTERN_COMPLEX_H
24500#pragma GCC visibility push(default)
24501#define rb_complex_raw1(x) rb_complex_raw((x), INT2FIX(0))
24502#define rb_complex_raw2(x,y) rb_complex_raw((x), (y))
24503#define rb_complex_new1(x) rb_complex_new((x), INT2FIX(0))
24504#define rb_complex_new2(x,y) rb_complex_new((x), (y))
24505#define rb_complex_add rb_complex_plus
24506#define rb_complex_sub rb_complex_minus
24507#define rb_complex_nagate rb_complex_uminus
24508#define rb_Complex1(x) rb_Complex((x), INT2FIX(0))
24509#define rb_Complex2(x,y) rb_Complex((x), (y))
24510#pragma GCC visibility pop
24511#define RBIMPL_INTERN_CONT_H
24512#pragma GCC visibility push(default)
24513#pragma GCC visibility pop
24514#define RBIMPL_INTERN_DIR_H
24515#pragma GCC visibility push(default)
24516#pragma GCC visibility pop
24517#define RBIMPL_INTERN_ENUM_H
24518#pragma GCC visibility push(default)
24519#pragma GCC visibility pop
24520#define RBIMPL_INTERN_ENUMERATOR_H
24521#define RBIMPL_INTERN_EVAL_H
24522#pragma GCC visibility push(default)
24523#pragma GCC visibility pop
24524#pragma GCC visibility push(default)
24525#pragma GCC visibility pop
24526#define SIZED_ENUMERATOR(obj,argc,argv,size_fn) rb_enumeratorize_with_size((obj), ID2SYM(rb_frame_this_func()), (argc), (argv), (size_fn))
24527#define SIZED_ENUMERATOR_KW(obj,argc,argv,size_fn,kw_splat) rb_enumeratorize_with_size_kw((obj), ID2SYM(rb_frame_this_func()), (argc), (argv), (size_fn), (kw_splat))
24528#define RETURN_SIZED_ENUMERATOR(obj,argc,argv,size_fn) do { if (!rb_block_given_p()) return SIZED_ENUMERATOR(obj, argc, argv, size_fn); } while (0)
24529#define RETURN_SIZED_ENUMERATOR_KW(obj,argc,argv,size_fn,kw_splat) do { if (!rb_block_given_p()) return SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat); } while (0)
24530#define RETURN_ENUMERATOR(obj,argc,argv) RETURN_SIZED_ENUMERATOR(obj, argc, argv, 0)
24531#define RETURN_ENUMERATOR_KW(obj,argc,argv,kw_splat) RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, 0, kw_splat)
24532#define RBIMPL_INTERN_FILE_H
24533#pragma GCC visibility push(default)
24534#pragma GCC visibility pop
24535#define RBIMPL_INTERN_GC_H
24536#pragma GCC visibility push(default)
24537#pragma GCC visibility pop
24538#define RBIMPL_INTERN_IO_H
24539#pragma GCC visibility push(default)
24540#define rb_defout rb_stdout
24541#define RB_RESERVED_FD_P(fd) rb_reserved_fd_p(fd)
24542#pragma GCC visibility pop
24543#define RBIMPL_INTERN_LOAD_H
24544#pragma GCC visibility push(default)
24545#define RB_EXT_RACTOR_SAFE(f) rb_ext_ractor_safe(f)
24546#define HAVE_RB_EXT_RACTOR_SAFE 1
24547#pragma GCC visibility pop
24548#define RBIMPL_INTERN_MARSHAL_H
24549#pragma GCC visibility push(default)
24550#pragma GCC visibility pop
24551#define RBIMPL_INTERN_NUMERIC_H
24552#define RB_NUM_COERCE_FUNCS_NEED_OPID 1
24553#pragma GCC visibility push(default)
24554#pragma GCC visibility pop
24555#define RBIMPL_INTERN_OBJECT_H
24556#pragma GCC visibility push(default)
24557#define RB_OBJ_INIT_COPY(obj,orig) ((obj) != (orig) && (rb_obj_init_copy((obj), (orig)), 1))
24558#define OBJ_INIT_COPY(obj,orig) RB_OBJ_INIT_COPY(obj, orig)
24559#pragma GCC visibility pop
24560#define RBIMPL_INTERN_PARSE_H
24561#pragma GCC visibility push(default)
24562#pragma GCC visibility pop
24563#define RBIMPL_INTERN_PROCESS_H
24564#pragma GCC visibility push(default)
24565#pragma GCC visibility pop
24566#define RBIMPL_INTERN_RANDOM_H
24567#pragma GCC visibility push(default)
24568#pragma GCC visibility pop
24569#define RBIMPL_INTERN_RANGE_H
24570#pragma GCC visibility push(default)
24571#pragma GCC visibility pop
24572#define RBIMPL_INTERN_RATIONAL_H
24573#pragma GCC visibility push(default)
24574#define rb_rational_raw1(x) rb_rational_raw((x), INT2FIX(1))
24575#define rb_rational_raw2(x,y) rb_rational_raw((x), (y))
24576#define rb_rational_new1(x) rb_rational_new((x), INT2FIX(1))
24577#define rb_rational_new2(x,y) rb_rational_new((x), (y))
24578#define rb_Rational1(x) rb_Rational((x), INT2FIX(1))
24579#define rb_Rational2(x,y) rb_Rational((x), (y))
24580#pragma GCC visibility pop
24581#define RBIMPL_INTERN_RE_H
24582#pragma GCC visibility push(default)
24583#define rb_memcmp memcmp
24584#define HAVE_RB_REG_NEW_STR 1
24585#pragma GCC visibility pop
24586#define RBIMPL_INTERN_RUBY_H
24587#pragma GCC visibility push(default)
24588#define rb_argv rb_get_argv()
24589#pragma GCC visibility pop
24590#define RBIMPL_INTERN_SELECT_H
24591#define RBIMPL_INTERN_SELECT_LARGESIZE_H
24592#define rb_fd_ptr rb_fd_ptr
24593#define rb_fd_max rb_fd_max
24594#pragma GCC visibility push(default)
24595#pragma GCC visibility pop
24596#pragma GCC visibility push(default)
24597#pragma GCC visibility pop
24598#define RBIMPL_INTERN_SIGNAL_H
24599#pragma GCC visibility push(default)
24600#define posix_signal ruby_posix_signal
24601#pragma GCC visibility pop
24602#define RBIMPL_INTERN_SPRINTF_H
24603#pragma GCC visibility push(default)
24604#pragma GCC visibility pop
24605#define RBIMPL_INTERN_STRING_H
24606#pragma GCC visibility push(default)
24607#define rb_str_dup_frozen rb_str_new_frozen
24608#define rb_hash_uint32(h,i) st_hash_uint32((h), (i))
24609#define rb_hash_uint(h,i) st_hash_uint((h), (i))
24610#define rb_hash_end(h) st_hash_end(h)
24611#define rb_str_new(str,len) ((RBIMPL_CONSTANT_P(str) && RBIMPL_CONSTANT_P(len) ? rb_str_new_static : rb_str_new) ((str), (len)))
24612#define rb_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_str_new_cstr : rb_str_new_cstr) (str))
24613#define rb_usascii_str_new(str,len) ((RBIMPL_CONSTANT_P(str) && RBIMPL_CONSTANT_P(len) ? rb_usascii_str_new_static : rb_usascii_str_new) ((str), (len)))
24614#define rb_utf8_str_new(str,len) ((RBIMPL_CONSTANT_P(str) && RBIMPL_CONSTANT_P(len) ? rb_utf8_str_new_static : rb_utf8_str_new) ((str), (len)))
24615#define rb_usascii_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_usascii_str_new_cstr : rb_usascii_str_new_cstr) (str))
24616#define rb_utf8_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_utf8_str_new_cstr : rb_utf8_str_new_cstr) (str))
24617#define rb_external_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_external_str_new_cstr : rb_external_str_new_cstr) (str))
24618#define rb_locale_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_locale_str_new_cstr : rb_locale_str_new_cstr) (str))
24619#define rb_str_buf_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_str_buf_new_cstr : rb_str_buf_new_cstr) (str))
24620#define rb_str_cat_cstr(buf,str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_str_cat_cstr : rb_str_cat_cstr) ((buf), (str)))
24621#define rb_exc_new_cstr(exc,str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_exc_new_cstr : rb_exc_new_cstr) ((exc), (str)))
24622#define rb_str_new2 rb_str_new_cstr
24623#define rb_str_new3 rb_str_new_shared
24624#define rb_str_new4 rb_str_new_frozen
24625#define rb_str_new5 rb_str_new_with_class
24626#define rb_str_buf_new2 rb_str_buf_new_cstr
24627#define rb_usascii_str_new2 rb_usascii_str_new_cstr
24628#define rb_str_buf_cat rb_str_cat
24629#define rb_str_buf_cat2 rb_str_cat_cstr
24630#define rb_str_cat2 rb_str_cat_cstr
24631#define rb_strlen_lit(str) (sizeof(str "") - 1)
24632#define rb_str_new_lit(str) rb_str_new_static((str), rb_strlen_lit(str))
24633#define rb_usascii_str_new_lit(str) rb_usascii_str_new_static((str), rb_strlen_lit(str))
24634#define rb_utf8_str_new_lit(str) rb_utf8_str_new_static((str), rb_strlen_lit(str))
24635#define rb_enc_str_new_lit(str,enc) rb_enc_str_new_static((str), rb_strlen_lit(str), (enc))
24636#define rb_str_new_literal(str) rb_str_new_lit(str)
24637#define rb_usascii_str_new_literal(str) rb_usascii_str_new_lit(str)
24638#define rb_utf8_str_new_literal(str) rb_utf8_str_new_lit(str)
24639#define rb_enc_str_new_literal(str,enc) rb_enc_str_new_lit(str, enc)
24640#pragma GCC visibility pop
24641#define RBIMPL_INTERN_STRUCT_H
24642#pragma GCC visibility push(default)
24643#pragma GCC visibility pop
24644#define RBIMPL_INTERN_THREAD_H
24645#pragma GCC visibility push(default)
24646#define RUBY_UBF_IO RBIMPL_CAST((rb_unblock_function_t *)-1)
24647#define RUBY_UBF_PROCESS RBIMPL_CAST((rb_unblock_function_t *)-1)
24648#pragma GCC visibility pop
24649#define RBIMPL_INTERN_TIME_H
24650#pragma GCC visibility push(default)
24651#pragma GCC visibility pop
24652#define RBIMPL_INTERN_VARIABLE_H
24653#pragma GCC visibility push(default)
24654#pragma GCC visibility pop
24655#define RUBY_VM 1
24656#define HAVE_NATIVETHREAD
24657#define InitVM(ext) {void InitVM_ ##ext(void);InitVM_ ##ext();}
24658#define rb_yield_values(argc,...) __extension__({ const int rb_yield_values_argc = (argc); const VALUE rb_yield_values_args[] = {__VA_ARGS__}; const int rb_yield_values_nargs = (int)(sizeof(rb_yield_values_args) / sizeof(VALUE)); rb_yield_values2( rb_varargs_argc_check(rb_yield_values_argc, rb_yield_values_nargs), rb_yield_values_nargs ? rb_yield_values_args : NULL); })
24659#define rb_funcall(recv,mid,argc,...) __extension__({ const int rb_funcall_argc = (argc); const VALUE rb_funcall_args[] = {__VA_ARGS__}; const int rb_funcall_nargs = (int)(sizeof(rb_funcall_args) / sizeof(VALUE)); rb_funcallv(recv, mid, rb_varargs_argc_check(rb_funcall_argc, rb_funcall_nargs), rb_funcall_nargs ? rb_funcall_args : NULL); })
24660#define RUBY_SUBST_H 1
24661#undef snprintf
24662#undef vsnprintf
24663#define snprintf ruby_snprintf
24664#define vsnprintf ruby_vsnprintf
24665#pragma GCC visibility pop
24666#define RUBY_VM_CORE_H
24667#define N_OR_RUBY_DEBUG(n) (((n) > 0) ? (n) : RUBY_DEBUG)
24668#define VM_CHECK_MODE N_OR_RUBY_DEBUG(0)
24669#define VMDEBUG 0
24670#define _SIGNAL_H
24671#define _BITS_SIGNUM_GENERIC_H 1
24672#define SIG_ERR ((__sighandler_t) -1)
24673#define SIG_DFL ((__sighandler_t) 0)
24674#define SIG_IGN ((__sighandler_t) 1)
24675#define SIG_HOLD ((__sighandler_t) 2)
24676#define SIGINT 2
24677#define SIGILL 4
24678#define SIGABRT 6
24679#define SIGFPE 8
24680#define SIGSEGV 11
24681#define SIGTERM 15
24682#define SIGHUP 1
24683#define SIGQUIT 3
24684#define SIGTRAP 5
24685#define SIGKILL 9
24686#define SIGPIPE 13
24687#define SIGALRM 14
24688#define SIGIO SIGPOLL
24689#define SIGIOT SIGABRT
24690#define SIGCLD SIGCHLD
24691#define _BITS_SIGNUM_ARCH_H 1
24692#define SIGSTKFLT 16
24693#define SIGPWR 30
24694#define SIGBUS 7
24695#define SIGSYS 31
24696#define SIGURG 23
24697#define SIGSTOP 19
24698#define SIGTSTP 20
24699#define SIGCONT 18
24700#define SIGCHLD 17
24701#define SIGTTIN 21
24702#define SIGTTOU 22
24703#define SIGPOLL 29
24704#define SIGXFSZ 25
24705#define SIGXCPU 24
24706#define SIGVTALRM 26
24707#define SIGPROF 27
24708#define SIGUSR1 10
24709#define SIGUSR2 12
24710#define SIGWINCH 28
24711#define SIGIO SIGPOLL
24712#define SIGIOT SIGABRT
24713#define SIGCLD SIGCHLD
24714#define __SIGRTMIN 32
24715#define __SIGRTMAX 64
24716#define _NSIG (__SIGRTMAX + 1)
24717#define __sig_atomic_t_defined 1
24718#define __siginfo_t_defined 1
24719#define __WORDSIZE 64
24720#define __WORDSIZE_TIME64_COMPAT32 1
24721#define __SYSCALL_WORDSIZE 64
24722#define ____sigval_t_defined
24723#define __SI_MAX_SIZE 128
24724#define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4)
24725#define _BITS_SIGINFO_ARCH_H 1
24726#define __SI_ALIGNMENT
24727#define __SI_BAND_TYPE long int
24728#define __SI_CLOCK_T __clock_t
24729#define __SI_ERRNO_THEN_CODE 1
24730#define __SI_HAVE_SIGSYS 1
24731#define __SI_SIGFAULT_ADDL
24732#define si_pid _sifields._kill.si_pid
24733#define si_uid _sifields._kill.si_uid
24734#define si_timerid _sifields._timer.si_tid
24735#define si_overrun _sifields._timer.si_overrun
24736#define si_status _sifields._sigchld.si_status
24737#define si_utime _sifields._sigchld.si_utime
24738#define si_stime _sifields._sigchld.si_stime
24739#define si_value _sifields._rt.si_sigval
24740#define si_int _sifields._rt.si_sigval.sival_int
24741#define si_ptr _sifields._rt.si_sigval.sival_ptr
24742#define si_addr _sifields._sigfault.si_addr
24743#define si_addr_lsb _sifields._sigfault.si_addr_lsb
24744#define si_lower _sifields._sigfault._bounds._addr_bnd._lower
24745#define si_upper _sifields._sigfault._bounds._addr_bnd._upper
24746#define si_pkey _sifields._sigfault._bounds._pkey
24747#define si_band _sifields._sigpoll.si_band
24748#define si_fd _sifields._sigpoll.si_fd
24749#define si_call_addr _sifields._sigsys._call_addr
24750#define si_syscall _sifields._sigsys._syscall
24751#define si_arch _sifields._sigsys._arch
24752#define _BITS_SIGINFO_CONSTS_H 1
24753#define __SI_ASYNCIO_AFTER_SIGIO 1
24754#define SI_ASYNCNL SI_ASYNCNL
24755#define SI_DETHREAD SI_DETHREAD
24756#define SI_TKILL SI_TKILL
24757#define SI_SIGIO SI_SIGIO
24758#define SI_ASYNCIO SI_ASYNCIO
24759#define SI_MESGQ SI_MESGQ
24760#define SI_TIMER SI_TIMER
24761#define SI_ASYNCIO SI_ASYNCIO
24762#define SI_QUEUE SI_QUEUE
24763#define SI_USER SI_USER
24764#define SI_KERNEL SI_KERNEL
24765#define ILL_ILLOPC ILL_ILLOPC
24766#define ILL_ILLOPN ILL_ILLOPN
24767#define ILL_ILLADR ILL_ILLADR
24768#define ILL_ILLTRP ILL_ILLTRP
24769#define ILL_PRVOPC ILL_PRVOPC
24770#define ILL_PRVREG ILL_PRVREG
24771#define ILL_COPROC ILL_COPROC
24772#define ILL_BADSTK ILL_BADSTK
24773#define ILL_BADIADDR ILL_BADIADDR
24774#define FPE_INTDIV FPE_INTDIV
24775#define FPE_INTOVF FPE_INTOVF
24776#define FPE_FLTDIV FPE_FLTDIV
24777#define FPE_FLTOVF FPE_FLTOVF
24778#define FPE_FLTUND FPE_FLTUND
24779#define FPE_FLTRES FPE_FLTRES
24780#define FPE_FLTINV FPE_FLTINV
24781#define FPE_FLTSUB FPE_FLTSUB
24782#define FPE_FLTUNK FPE_FLTUNK
24783#define FPE_CONDTRAP FPE_CONDTRAP
24784#define SEGV_MAPERR SEGV_MAPERR
24785#define SEGV_ACCERR SEGV_ACCERR
24786#define SEGV_BNDERR SEGV_BNDERR
24787#define SEGV_PKUERR SEGV_PKUERR
24788#define SEGV_ACCADI SEGV_ACCADI
24789#define SEGV_ADIDERR SEGV_ADIDERR
24790#define SEGV_ADIPERR SEGV_ADIPERR
24791#define SEGV_MTEAERR SEGV_MTEAERR
24792#define SEGV_MTESERR SEGV_MTESERR
24793#define BUS_ADRALN BUS_ADRALN
24794#define BUS_ADRERR BUS_ADRERR
24795#define BUS_OBJERR BUS_OBJERR
24796#define BUS_MCEERR_AR BUS_MCEERR_AR
24797#define BUS_MCEERR_AO BUS_MCEERR_AO
24798#define TRAP_BRKPT TRAP_BRKPT
24799#define TRAP_TRACE TRAP_TRACE
24800#define TRAP_BRANCH TRAP_BRANCH
24801#define TRAP_HWBKPT TRAP_HWBKPT
24802#define TRAP_UNK TRAP_UNK
24803#define CLD_EXITED CLD_EXITED
24804#define CLD_KILLED CLD_KILLED
24805#define CLD_DUMPED CLD_DUMPED
24806#define CLD_TRAPPED CLD_TRAPPED
24807#define CLD_STOPPED CLD_STOPPED
24808#define CLD_CONTINUED CLD_CONTINUED
24809#define POLL_IN POLL_IN
24810#define POLL_OUT POLL_OUT
24811#define POLL_MSG POLL_MSG
24812#define POLL_ERR POLL_ERR
24813#define POLL_PRI POLL_PRI
24814#define POLL_HUP POLL_HUP
24815#define _BITS_SIGINFO_CONSTS_ARCH_H 1
24816#define __sigval_t_defined
24817#define __sigevent_t_defined 1
24818#define __WORDSIZE 64
24819#define __WORDSIZE_TIME64_COMPAT32 1
24820#define __SYSCALL_WORDSIZE 64
24821#define __SIGEV_MAX_SIZE 64
24822#define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
24823#define sigev_notify_function _sigev_un._sigev_thread._function
24824#define sigev_notify_attributes _sigev_un._sigev_thread._attribute
24825#define _BITS_SIGEVENT_CONSTS_H 1
24826#define SIGEV_SIGNAL SIGEV_SIGNAL
24827#define SIGEV_NONE SIGEV_NONE
24828#define SIGEV_THREAD SIGEV_THREAD
24829#define SIGEV_THREAD_ID SIGEV_THREAD_ID
24830#define sigmask(sig) __glibc_macro_warning ("sigmask is deprecated") ((int)(1u << ((sig) - 1)))
24831#define NSIG _NSIG
24832#define _BITS_SIGACTION_H 1
24833#define sa_handler __sigaction_handler.sa_handler
24834#define sa_sigaction __sigaction_handler.sa_sigaction
24835#define SA_NOCLDSTOP 1
24836#define SA_NOCLDWAIT 2
24837#define SA_SIGINFO 4
24838#define SA_ONSTACK 0x08000000
24839#define SA_RESTART 0x10000000
24840#define SA_NODEFER 0x40000000
24841#define SA_RESETHAND 0x80000000
24842#define SA_INTERRUPT 0x20000000
24843#define SA_NOMASK SA_NODEFER
24844#define SA_ONESHOT SA_RESETHAND
24845#define SA_STACK SA_ONSTACK
24846#define SIG_BLOCK 0
24847#define SIG_UNBLOCK 1
24848#define SIG_SETMASK 2
24849#define _BITS_SIGCONTEXT_H 1
24850#define FP_XSTATE_MAGIC1 0x46505853U
24851#define FP_XSTATE_MAGIC2 0x46505845U
24852#define FP_XSTATE_MAGIC2_SIZE sizeof (FP_XSTATE_MAGIC2)
24853#define __need_size_t
24854#undef __need_ptrdiff_t
24855#undef __need_size_t
24856#undef __need_wchar_t
24857#undef NULL
24858#define NULL ((void *)0)
24859#undef __need_NULL
24860#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
24861#define __stack_t_defined 1
24862#define __need_size_t
24863#undef __need_ptrdiff_t
24864#undef __need_size_t
24865#undef __need_wchar_t
24866#undef NULL
24867#define NULL ((void *)0)
24868#undef __need_NULL
24869#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
24870#define _SYS_UCONTEXT_H 1
24871#define __ctx(fld) fld
24872#define __NGREG 23
24873#define NGREG __NGREG
24874#define REG_R8 REG_R8
24875#define REG_R9 REG_R9
24876#define REG_R10 REG_R10
24877#define REG_R11 REG_R11
24878#define REG_R12 REG_R12
24879#define REG_R13 REG_R13
24880#define REG_R14 REG_R14
24881#define REG_R15 REG_R15
24882#define REG_RDI REG_RDI
24883#define REG_RSI REG_RSI
24884#define REG_RBP REG_RBP
24885#define REG_RBX REG_RBX
24886#define REG_RDX REG_RDX
24887#define REG_RAX REG_RAX
24888#define REG_RCX REG_RCX
24889#define REG_RSP REG_RSP
24890#define REG_RIP REG_RIP
24891#define REG_EFL REG_EFL
24892#define REG_CSGSFS REG_CSGSFS
24893#define REG_ERR REG_ERR
24894#define REG_TRAPNO REG_TRAPNO
24895#define REG_OLDMASK REG_OLDMASK
24896#define REG_CR2 REG_CR2
24897#undef __ctx
24898#define _BITS_SIGSTACK_H 1
24899#define MINSIGSTKSZ 2048
24900#define SIGSTKSZ 8192
24901#undef SIGSTKSZ
24902#define SIGSTKSZ sysconf (_SC_SIGSTKSZ)
24903#undef MINSIGSTKSZ
24904#define MINSIGSTKSZ SIGSTKSZ
24905#define _BITS_SS_FLAGS_H 1
24906#define SS_ONSTACK SS_ONSTACK
24907#define SS_DISABLE SS_DISABLE
24908#define __sigstack_defined 1
24909#define _BITS_SIGTHREAD_H 1
24910#define SIGRTMIN (__libc_current_sigrtmin ())
24911#define SIGRTMAX (__libc_current_sigrtmax ())
24912#define RUBY_TOPLEVEL_ASSERT_H
24913#undef assert
24914#define assert RUBY_ASSERT_NDEBUG
24915#define VM_ASSERT(expr) ((void)0)
24916#define VM_UNREACHABLE(func) UNREACHABLE
24917#define RUBY_DEBUG_THREAD_SCHEDULE()
24918#define RUBY_ASSERT_MUTEX_OWNED(mutex) VM_ASSERT(rb_mutex_owned_p(mutex))
24919#define RUBY_ASSERT_CRITICAL_SECTION_ENTER()
24920#define RUBY_ASSERT_CRITICAL_SECTION_LEAVE()
24921#define _SETJMP_H 1
24922#define _BITS_SETJMP_H 1
24923#define __WORDSIZE 64
24924#define __WORDSIZE_TIME64_COMPAT32 1
24925#define __SYSCALL_WORDSIZE 64
24926#define __jmp_buf_tag_defined 1
24927#define setjmp(env) _setjmp (env)
24928#define sigsetjmp(env,savemask) __sigsetjmp (env, savemask)
24929#define RB_THREAD_T_HAS_NATIVE_ID
24930#define CCAN_LIST_H
24931#undef _ASSERT_H
24932#undef assert
24933#undef __ASSERT_VOID_CAST
24934#undef assert_perror
24935#define _ASSERT_H 1
24936#define __ASSERT_VOID_CAST (void)
24937#define assert(expr) (__ASSERT_VOID_CAST (0))
24938#define assert_perror(errnum) (__ASSERT_VOID_CAST (0))
24939#undef static_assert
24940#define static_assert _Static_assert
24941#define CCAN_STR_H
24942#define stringify(expr) ccan_stringify_1(expr)
24943#define ccan_stringify(expr) ccan_stringify_1(expr)
24944#define ccan_stringify_1(expr) #expr
24945#define CCAN_CONTAINER_OF_H
24946#define CCAN_CHECK_TYPE_H
24947#define ccan_check_type(expr,type) ((typeof(expr) *)0 != (type *)0)
24948#define ccan_check_types_match(expr1,expr2) ((typeof(expr1) *)0 != (typeof(expr2) *)0)
24949#define ccan_container_of(member_ptr,containing_type,member) ((containing_type *) ((char *)(member_ptr) - ccan_container_off(containing_type, member)) + ccan_check_types_match(*(member_ptr), ((containing_type *)0)->member))
24950#define ccan_container_of_or_null(member_ptr,containing_type,member) ((containing_type *) ccan_container_of_or_null_(member_ptr, ccan_container_off(containing_type, member)) + ccan_check_types_match(*(member_ptr), ((containing_type *)0)->member))
24951#define ccan_container_off(containing_type,member) offsetof(containing_type, member)
24952#define ccan_container_of_var(member_ptr,container_var,member) ccan_container_of(member_ptr, typeof(*container_var), member)
24953#define ccan_container_off_var(var,member) ccan_container_off(typeof(*var), member)
24954#define CCAN_LIST_LOC __FILE__ ":" ccan_stringify(__LINE__)
24955#define ccan_list_debug(h,loc) ((void)loc, h)
24956#define ccan_list_debug_node(n,loc) ((void)loc, n)
24957#define CCAN_LIST_HEAD_INIT(name) { { &(name).n, &(name).n } }
24958#define CCAN_LIST_HEAD(name) struct ccan_list_head name = CCAN_LIST_HEAD_INIT(name)
24959#define ccan_list_add_after(h,p,n) ccan_list_add_after_(h, p, n, CCAN_LIST_LOC)
24960#define ccan_list_add(h,n) ccan_list_add_(h, n, CCAN_LIST_LOC)
24961#define ccan_list_add_before(h,p,n) ccan_list_add_before_(h, p, n, CCAN_LIST_LOC)
24962#define ccan_list_add_tail(h,n) ccan_list_add_tail_(h, n, CCAN_LIST_LOC)
24963#define ccan_list_empty(h) ccan_list_empty_(h, CCAN_LIST_LOC)
24964#define ccan_list_empty_nodebug(h) ccan_list_empty(h)
24965#define ccan_list_del(n) ccan_list_del_(n, CCAN_LIST_LOC)
24966#define ccan_list_del_init(n) ccan_list_del_init_(n, CCAN_LIST_LOC)
24967#define ccan_list_swap(o,n) ccan_list_swap_(o, n, CCAN_LIST_LOC)
24968#define ccan_list_entry(n,type,member) ccan_container_of(n, type, member)
24969#define ccan_list_top(h,type,member) ((type *)ccan_list_top_((h), ccan_list_off_(type, member)))
24970#define ccan_list_pop(h,type,member) ((type *)ccan_list_pop_((h), ccan_list_off_(type, member)))
24971#define ccan_list_tail(h,type,member) ((type *)ccan_list_tail_((h), ccan_list_off_(type, member)))
24972#define ccan_list_for_each(h,i,member) ccan_list_for_each_off(h, i, ccan_list_off_var_(i, member))
24973#define ccan_list_for_each_rev(h,i,member) ccan_list_for_each_rev_off(h, i, ccan_list_off_var_(i, member))
24974#define ccan_list_for_each_rev_safe(h,i,nxt,member) ccan_list_for_each_rev_safe_off(h, i, nxt, ccan_list_off_var_(i, member))
24975#define ccan_list_for_each_safe(h,i,nxt,member) ccan_list_for_each_safe_off(h, i, nxt, ccan_list_off_var_(i, member))
24976#define ccan_list_next(h,i,member) ((ccan_list_typeof(i))ccan_list_entry_or_null(ccan_list_debug(h, __FILE__ ":" ccan_stringify(__LINE__)), (i)->member.next, ccan_list_off_var_((i), member)))
24977#define ccan_list_prev(h,i,member) ((ccan_list_typeof(i))ccan_list_entry_or_null(ccan_list_debug(h, __FILE__ ":" ccan_stringify(__LINE__)), (i)->member.prev, ccan_list_off_var_((i), member)))
24978#define ccan_list_append_list(t,f) ccan_list_append_list_(t, f, __FILE__ ":" ccan_stringify(__LINE__))
24979#define ccan_list_prepend_list(t,f) ccan_list_prepend_list_(t, f, CCAN_LIST_LOC)
24980#define ccan_list_for_each_off_dir_(h,i,off,dir) for (i = ccan_list_node_to_off_(ccan_list_debug(h, CCAN_LIST_LOC)->n.dir, (off)); ccan_list_node_from_off_((void *)i, (off)) != &(h)->n; i = ccan_list_node_to_off_(ccan_list_node_from_off_((void *)i, (off))->dir, (off)))
24981#define ccan_list_for_each_safe_off_dir_(h,i,nxt,off,dir) for (i = ccan_list_node_to_off_(ccan_list_debug(h, CCAN_LIST_LOC)->n.dir, (off)), nxt = ccan_list_node_to_off_(ccan_list_node_from_off_(i, (off))->dir, (off)); ccan_list_node_from_off_(i, (off)) != &(h)->n; i = nxt, nxt = ccan_list_node_to_off_(ccan_list_node_from_off_(i, (off))->dir, (off)))
24982#define ccan_list_for_each_off(h,i,off) ccan_list_for_each_off_dir_((h),(i),(off),next)
24983#define ccan_list_for_each_rev_off(h,i,off) ccan_list_for_each_off_dir_((h),(i),(off),prev)
24984#define ccan_list_for_each_safe_off(h,i,nxt,off) ccan_list_for_each_safe_off_dir_((h),(i),(nxt),(off),next)
24985#define ccan_list_for_each_rev_safe_off(h,i,nxt,off) ccan_list_for_each_safe_off_dir_((h),(i),(nxt),(off),prev)
24986#define ccan_list_entry_off(n,type,off) ((type *)ccan_list_node_from_off_((n), (off)))
24987#define ccan_list_head_off(h,type,off) ((type *)ccan_list_head_off((h), (off)))
24988#define ccan_list_tail_off(h,type,off) ((type *)ccan_list_tail_((h), (off)))
24989#define ccan_list_add_off(h,n,off) ccan_list_add((h), ccan_list_node_from_off_((n), (off)))
24990#define ccan_list_del_off(n,off) ccan_list_del(ccan_list_node_from_off_((n), (off)))
24991#define ccan_list_del_from_off(h,n,off) ccan_list_del_from(h, ccan_list_node_from_off_((n), (off)))
24992#define ccan_list_off_(type,member) (ccan_container_off(type, member) + ccan_check_type(((type *)0)->member, struct ccan_list_node))
24993#define ccan_list_off_var_(var,member) (ccan_container_off_var(var, member) + ccan_check_type(var->member, struct ccan_list_node))
24994#define ccan_list_typeof(var) typeof(var)
24995#define RUBY_ID_H
24996#define ID_STATIC_SYM RUBY_ID_STATIC_SYM
24997#define ID_SCOPE_SHIFT RUBY_ID_SCOPE_SHIFT
24998#define ID_SCOPE_MASK RUBY_ID_SCOPE_MASK
24999#define ID_LOCAL RUBY_ID_LOCAL
25000#define ID_INSTANCE RUBY_ID_INSTANCE
25001#define ID_GLOBAL RUBY_ID_GLOBAL
25002#define ID_ATTRSET RUBY_ID_ATTRSET
25003#define ID_CONST RUBY_ID_CONST
25004#define ID_CLASS RUBY_ID_CLASS
25005#define ID_JUNK RUBY_ID_JUNK
25006#define ID_INTERNAL RUBY_ID_INTERNAL
25007#define symIFUNC ID2SYM(idIFUNC)
25008#define symCFUNC ID2SYM(idCFUNC)
25009#define RUBY_TOKEN_DOT2 128
25010#define RUBY_TOKEN_DOT3 129
25011#define RUBY_TOKEN_BDOT2 130
25012#define RUBY_TOKEN_BDOT3 131
25013#define RUBY_TOKEN_UPLUS 132
25014#define RUBY_TOKEN_UMINUS 133
25015#define RUBY_TOKEN_POW 134
25016#define RUBY_TOKEN_CMP 135
25017#define RUBY_TOKEN_LSHFT 136
25018#define RUBY_TOKEN_RSHFT 137
25019#define RUBY_TOKEN_LEQ 138
25020#define RUBY_TOKEN_GEQ 139
25021#define RUBY_TOKEN_EQ 140
25022#define RUBY_TOKEN_EQQ 141
25023#define RUBY_TOKEN_NEQ 142
25024#define RUBY_TOKEN_MATCH 143
25025#define RUBY_TOKEN_NMATCH 144
25026#define RUBY_TOKEN_AREF 145
25027#define RUBY_TOKEN_ASET 146
25028#define RUBY_TOKEN_COLON2 147
25029#define RUBY_TOKEN_ANDOP 148
25030#define RUBY_TOKEN_OROP 149
25031#define RUBY_TOKEN_ANDDOT 150
25032#define RUBY_TOKEN(t) RUBY_TOKEN_ ##t
25033#define RUBY_TOKEN2ID_TYPE(tok,type) ((tok<<RUBY_ID_SCOPE_SHIFT)|type|RUBY_ID_STATIC_SYM)
25034#define TOKEN2LOCALID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_LOCAL)
25035#define TOKEN2INSTANCEID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_INSTANCE)
25036#define TOKEN2GLOBALID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_GLOBAL)
25037#define TOKEN2CONSTID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_CONST)
25038#define TOKEN2CLASSID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_CLASS)
25039#define TOKEN2ATTRSETID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_ATTRSET)
25040#define DEFINE_LOCALID_FROM_TOKEN(n) id ##n = TOKEN2LOCALID(t ##n)
25041#define DEFINE_INSTANCEID_FROM_TOKEN(n) id ##n = TOKEN2INSTANCEID(t ##n)
25042#define DEFINE_GLOBALID_FROM_TOKEN(n) id ##n = TOKEN2GLOBALID(t ##n)
25043#define DEFINE_CONSTID_FROM_TOKEN(n) id ##n = TOKEN2CONSTID(t ##n)
25044#define DEFINE_CLASSID_FROM_TOKEN(n) id ##n = TOKEN2CLASSID(t ##n)
25045#define DEFINE_ATTRSETID_FROM_TOKEN(n) id ##n = TOKEN2ATTRSETID(t ##n)
25046#define RUBY_INTERNAL_H 1
25047#define LIKELY(x) RB_LIKELY(x)
25048#define UNLIKELY(x) RB_UNLIKELY(x)
25049#define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
25050#define roomof(x,y) (((x) + (y) - 1) / (y))
25051#define type_roomof(x,y) roomof(sizeof(x), sizeof(y))
25052#define ACCESS_ONCE(type,x) (*((volatile type *)&(x)))
25053#undef RARRAY_AREF
25054#undef RClass
25055#undef RCLASS_SUPER
25056#undef NEWOBJ_OF
25057#undef RB_NEWOBJ_OF
25058#undef RB_OBJ_WRITE
25059#undef RHASH_IFNONE
25060#undef RHASH_SIZE
25061#undef RHASH_TBL
25062#undef RHASH_EMPTY_P
25063#undef ROBJECT_IV_INDEX_TBL
25064#undef RSTRUCT_LEN
25065#undef RSTRUCT_PTR
25066#undef RSTRUCT_SET
25067#undef RSTRUCT_GET
25068#define rb_ary_new_from_args(...) rb_nonexistent_symbol(__VA_ARGS__)
25069#define rb_io_fptr_finalize(...) rb_nonexistent_symbol(__VA_ARGS__)
25070#define rb_fstring_cstr(...) rb_nonexistent_symbol(__VA_ARGS__)
25071#define rb_sym_intern_ascii_cstr(...) rb_nonexistent_symbol(__VA_ARGS__)
25072#define rb_funcallv(...) rb_nonexistent_symbol(__VA_ARGS__)
25073#define rb_method_basic_definition_p(...) rb_nonexistent_symbol(__VA_ARGS__)
25074#pragma GCC visibility push(default)
25075#pragma GCC visibility pop
25076#define rp(obj) rb_obj_info_dump_loc((VALUE)(obj), __FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING)
25077#define rp_m(msg,obj) do { fputs((msg), stderr); rb_obj_info_dump((VALUE)(obj)); } while (0)
25078#define bp() ruby_debug_breakpoint()
25079#define RBOOL(v) ((v) ? Qtrue : Qfalse)
25080#define RB_BIGNUM_TYPE_P(x) RB_TYPE_P((x), T_BIGNUM)
25081#define INTERNAL_ARRAY_H
25082#define INTERNAL_STATIC_ASSERT_H
25083#define STATIC_ASSERT RBIMPL_STATIC_ASSERT
25084#define ARRAY_DEBUG (0+RUBY_DEBUG)
25085#define RARRAY_PTR_IN_USE_FLAG FL_USER14
25086#pragma GCC visibility push(default)
25087#pragma GCC visibility pop
25088#undef rb_ary_new_from_args
25089#define rb_ary_new_from_args(n,...) __extension__ ({ const VALUE args_to_new_ary[] = {__VA_ARGS__}; if (__builtin_constant_p(n)) { STATIC_ASSERT(rb_ary_new_from_args, numberof(args_to_new_ary) == (n)); } rb_ary_new_from_values(numberof(args_to_new_ary), args_to_new_ary); })
25090#undef RARRAY_AREF
25091#define INTERNAL_SERIAL_H
25092#define SERIALT2NUM ULL2NUM
25093#define PRI_SERIALT_PREFIX PRI_LL_PREFIX
25094#define SIZEOF_SERIAL_T SIZEOF_LONG_LONG
25095#define INTERNAL_VM_H
25096#undef rb_funcallv
25097#undef rb_method_basic_definition_p
25098#pragma GCC visibility push(default)
25099#pragma GCC visibility pop
25100#pragma GCC visibility push(default)
25101#pragma GCC visibility pop
25102#pragma GCC visibility push(default)
25103#pragma GCC visibility pop
25104#pragma GCC visibility push(default)
25105#pragma GCC visibility pop
25106#define RUBY_DTRACE_CREATE_HOOK(name,arg) RUBY_DTRACE_HOOK(name ##_CREATE, arg)
25107#define RUBY_DTRACE_HOOK(name,arg) do { if (UNLIKELY(RUBY_DTRACE_ ##name ##_ENABLED())) { int dtrace_line; const char *dtrace_file = rb_source_location_cstr(&dtrace_line); if (!dtrace_file) dtrace_file = ""; RUBY_DTRACE_ ##name(arg, dtrace_file, dtrace_line); } } while (0)
25108#define RUBY_METHOD_H 1
25109#define INTERNAL_IMEMO_H
25110#define INTERNAL_GC_H
25111#define INTERNAL_COMPILERS_H
25112#define RUBY_BACKWARD2_GCC_VERSION_SINCE_H
25113#define GCC_VERSION_SINCE(x,y,z) RBIMPL_COMPILER_SINCE(GCC, (x), (y), (z))
25114#define GCC_VERSION_BEFORE(x,y,z) (RBIMPL_COMPILER_BEFORE(GCC, (x), (y), (z)) || (RBIMPL_COMPILER_IS(GCC) && ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && (RBIMPL_COMPILER_VERSION_PATCH == (z))))))
25115#define MSC_VERSION_SINCE(_) RBIMPL_COMPILER_SINCE(MSVC, (_) / 100, (_) % 100, 0)
25116#define MSC_VERSION_BEFORE(_) RBIMPL_COMPILER_BEFORE(MSVC, (_) / 100, (_) % 100, 0)
25117#define __has_declspec_attribute(...) RBIMPL_HAS_DECLSPEC_ATTRIBUTE(__VA_ARGS__)
25118#define __has_feature(...) RBIMPL_HAS_FEATURE(__VA_ARGS__)
25119#define __has_extension(...) RBIMPL_HAS_EXTENSION(__VA_ARGS__)
25120#define __has_warning(...) RBIMPL_HAS_WARNING(__VA_ARGS__)
25121#define RB_OBJ_BUILTIN_TYPE(obj) rb_obj_builtin_type(obj)
25122#define OBJ_BUILTIN_TYPE(obj) RB_OBJ_BUILTIN_TYPE(obj)
25123#define rb_obj_builtin_type(obj) __extension__({ VALUE arg_obj = (obj); RB_SPECIAL_CONST_P(arg_obj) ? -1 : (int)RB_BUILTIN_TYPE(arg_obj); })
25124#define FLEX_ARY_LEN
25125#define BITFIELD(type,name,size) type name : size
25126#define RVALUE_SIZE (sizeof(struct RBasic) + sizeof(VALUE[RBIMPL_RVALUE_EMBED_LEN_MAX]))
25127#define RB_RVARGC_NEWOBJ_OF(var,T,c,f,s) T *(var) = (T *)(((f) & FL_WB_PROTECTED) ? rb_wb_protected_newobj_of((c), (f) & ~FL_WB_PROTECTED, s) : rb_wb_unprotected_newobj_of((c), (f), s))
25128#define RB_RVARGC_EC_NEWOBJ_OF(ec,var,T,c,f,s) T *(var) = (T *)(((f) & FL_WB_PROTECTED) ? rb_ec_wb_protected_newobj_of((ec), (c), (f) & ~FL_WB_PROTECTED, s) : rb_wb_unprotected_newobj_of((c), (f), s))
25129#define RB_NEWOBJ_OF(var,T,c,f) RB_RVARGC_NEWOBJ_OF(var, T, c, f, RVALUE_SIZE)
25130#define RB_EC_NEWOBJ_OF(ec,var,T,c,f) RB_RVARGC_EC_NEWOBJ_OF(ec, var, T, c, f, RVALUE_SIZE)
25131#define NEWOBJ_OF(var,T,c,f) RB_NEWOBJ_OF((var), T, (c), (f))
25132#define RVARGC_NEWOBJ_OF(var,T,c,f,s) RB_RVARGC_NEWOBJ_OF((var), T, (c), (f), (s))
25133#define RB_OBJ_GC_FLAGS_MAX 6
25134#define INTERNAL_WARNINGS_H
25135#define COMPILER_WARNING_PUSH RBIMPL_WARNING_PUSH()
25136#define COMPILER_WARNING_POP RBIMPL_WARNING_POP()
25137#define COMPILER_WARNING_ERROR(flag) RBIMPL_WARNING_ERROR(flag)
25138#define COMPILER_WARNING_IGNORED(flag) RBIMPL_WARNING_IGNORED(flag)
25139#define UNALIGNED_MEMBER_ACCESS(expr) __extension__({ COMPILER_WARNING_PUSH; COMPILER_WARNING_IGNORED(-Waddress-of-packed-member); __typeof__(expr) unaligned_member_access_result = (expr); COMPILER_WARNING_POP; unaligned_member_access_result; })
25140#define UNALIGNED_MEMBER_PTR(ptr,mem) UNALIGNED_MEMBER_ACCESS(&(ptr)->mem)
25141#define RB_OBJ_WRITE(a,slot,b) rb_obj_write((VALUE)(a), UNALIGNED_MEMBER_ACCESS((VALUE *)(slot)), (VALUE)(b), __FILE__, __LINE__)
25142#define SIZE_POOL_COUNT 5
25143#pragma GCC visibility push(default)
25144#pragma GCC visibility pop
25145#pragma GCC visibility push(default)
25146#pragma GCC visibility pop
25147#define SIZED_REALLOC_N(x,y,z,w) REALLOC_N(x, y, z)
25148#define ruby_sized_xrealloc ruby_sized_xrealloc_inlined
25149#define ruby_sized_xrealloc2 ruby_sized_xrealloc2_inlined
25150#define ruby_sized_xfree ruby_sized_xfree_inlined
25151#define IMEMO_DEBUG 0
25152#define IMEMO_MASK 0x0f
25153#define IMEMO_FL_USHIFT (FL_USHIFT + 4)
25154#define IMEMO_FL_USER0 FL_USER4
25155#define IMEMO_FL_USER1 FL_USER5
25156#define IMEMO_FL_USER2 FL_USER6
25157#define IMEMO_FL_USER3 FL_USER7
25158#define IMEMO_FL_USER4 FL_USER8
25159#define IMEMO_FL_USER5 FL_USER9
25160#define THROW_DATA_CONSUMED IMEMO_FL_USER0
25161#define THROW_DATA_P(err) imemo_throw_data_p((VALUE)err)
25162#define MEMO_CAST(m) ((struct MEMO *)(m))
25163#define MEMO_NEW(a,b,c) ((struct MEMO *)rb_imemo_new(imemo_memo, (VALUE)(a), (VALUE)(b), (VALUE)(c), 0))
25164#define MEMO_FOR(type,value) ((type *)RARRAY_PTR(value))
25165#define NEW_MEMO_FOR(type,value) ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), MEMO_FOR(type, value))
25166#define NEW_PARTIAL_MEMO_FOR(type,value,member) ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), rb_ary_set_len((value), offsetof(type, member) / sizeof(VALUE)), MEMO_FOR(type, value))
25167#pragma GCC visibility push(default)
25168#pragma GCC visibility pop
25169#define IMEMO_TYPE_P(v,t) imemo_type_p((VALUE)v, t)
25170#pragma GCC diagnostic push
25171#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25172#pragma GCC diagnostic pop
25173#pragma GCC diagnostic push
25174#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25175#pragma GCC diagnostic pop
25176#define END_OF_ENUMERATION(key)
25177#define METHOD_ENTRY_VISI(me) (rb_method_visibility_t)(((me)->flags & (IMEMO_FL_USER0 | IMEMO_FL_USER1)) >> (IMEMO_FL_USHIFT+0))
25178#define METHOD_ENTRY_BASIC(me) (int) (((me)->flags & (IMEMO_FL_USER2 )) >> (IMEMO_FL_USHIFT+2))
25179#define METHOD_ENTRY_COMPLEMENTED(me) ((me)->flags & IMEMO_FL_USER3)
25180#define METHOD_ENTRY_COMPLEMENTED_SET(me) ((me)->flags |= IMEMO_FL_USER3)
25181#define METHOD_ENTRY_CACHED(me) ((me)->flags & IMEMO_FL_USER4)
25182#define METHOD_ENTRY_CACHED_SET(me) ((me)->flags |= IMEMO_FL_USER4)
25183#define METHOD_ENTRY_INVALIDATED(me) ((me)->flags & IMEMO_FL_USER5)
25184#define METHOD_ENTRY_INVALIDATED_SET(me) ((me)->flags |= IMEMO_FL_USER5)
25185#define METHOD_ENTRY_CACHEABLE(me) !(METHOD_ENTRY_VISI(me) == METHOD_VISI_PROTECTED)
25186#define VM_METHOD_TYPE_MINIMUM_BITS 4
25187#define rb_iseq_t rb_iseq_t
25188#define UNDEFINED_METHOD_ENTRY_P(me) (!(me) || !(me)->def || (me)->def->type == VM_METHOD_TYPE_UNDEF)
25189#define UNDEFINED_REFINED_METHOD_P(def) ((def)->type == VM_METHOD_TYPE_REFINED && UNDEFINED_METHOD_ENTRY_P((def)->body.refined.orig_me))
25190#pragma GCC visibility push(default)
25191#pragma GCC visibility pop
25192#define RUBY_NODE_H 1
25193#define RNODE(obj) ((struct RNode *)(obj))
25194#define NODE_FL_NEWLINE (((VALUE)1)<<7)
25195#define NODE_TYPESHIFT 8
25196#define NODE_TYPEMASK (((VALUE)0x7f)<<NODE_TYPESHIFT)
25197#define nd_type(n) ((int) (((n)->flags & NODE_TYPEMASK)>>NODE_TYPESHIFT))
25198#define nd_set_type(n,t) rb_node_set_type(n, t)
25199#define nd_init_type(n,t) (n)->flags=(((n)->flags&~NODE_TYPEMASK)|((((unsigned long)(t))<<NODE_TYPESHIFT)&NODE_TYPEMASK))
25200#define NODE_LSHIFT (NODE_TYPESHIFT+7)
25201#define NODE_LMASK (((SIGNED_VALUE)1<<(sizeof(VALUE)*CHAR_BIT-NODE_LSHIFT))-1)
25202#define nd_line(n) (int)(((SIGNED_VALUE)(n)->flags)>>NODE_LSHIFT)
25203#define nd_set_line(n,l) (n)->flags=(((n)->flags&~((VALUE)(-1)<<NODE_LSHIFT))|((VALUE)((l)&NODE_LMASK)<<NODE_LSHIFT))
25204#define nd_first_column(n) ((int)((n)->nd_loc.beg_pos.column))
25205#define nd_set_first_column(n,v) ((n)->nd_loc.beg_pos.column = (v))
25206#define nd_first_lineno(n) ((int)((n)->nd_loc.beg_pos.lineno))
25207#define nd_set_first_lineno(n,v) ((n)->nd_loc.beg_pos.lineno = (v))
25208#define nd_first_loc(n) ((n)->nd_loc.beg_pos)
25209#define nd_set_first_loc(n,v) (nd_first_loc(n) = (v))
25210#define nd_last_column(n) ((int)((n)->nd_loc.end_pos.column))
25211#define nd_set_last_column(n,v) ((n)->nd_loc.end_pos.column = (v))
25212#define nd_last_lineno(n) ((int)((n)->nd_loc.end_pos.lineno))
25213#define nd_set_last_lineno(n,v) ((n)->nd_loc.end_pos.lineno = (v))
25214#define nd_last_loc(n) ((n)->nd_loc.end_pos)
25215#define nd_set_last_loc(n,v) (nd_last_loc(n) = (v))
25216#define nd_node_id(n) ((n)->node_id)
25217#define nd_set_node_id(n,id) ((n)->node_id = (id))
25218#define nd_head u1.node
25219#define nd_alen u2.argc
25220#define nd_next u3.node
25221#define nd_cond u1.node
25222#define nd_body u2.node
25223#define nd_else u3.node
25224#define nd_resq u2.node
25225#define nd_ensr u3.node
25226#define nd_1st u1.node
25227#define nd_2nd u2.node
25228#define nd_stts u1.node
25229#define nd_entry u3.id
25230#define nd_vid u1.id
25231#define nd_var u1.node
25232#define nd_iter u3.node
25233#define nd_value u2.node
25234#define nd_aid u3.id
25235#define nd_lit u1.value
25236#define nd_recv u1.node
25237#define nd_mid u2.id
25238#define nd_args u3.node
25239#define nd_ainfo u3.args
25240#define nd_defn u3.node
25241#define nd_cpath u1.node
25242#define nd_super u3.node
25243#define nd_beg u1.node
25244#define nd_end u2.node
25245#define nd_state u3.state
25246#define nd_nth u2.argc
25247#define nd_alias u1.id
25248#define nd_orig u2.id
25249#define nd_undef u2.node
25250#define nd_brace u2.argc
25251#define nd_pconst u1.node
25252#define nd_pkwargs u2.node
25253#define nd_pkwrestarg u3.node
25254#define nd_apinfo u3.apinfo
25255#define nd_fpinfo u3.fpinfo
25256#define nd_tbl u1.tbl
25257#define nd_pid u1.id
25258#define nd_plen u2.argc
25259#define nd_cflag u2.id
25260#define nd_cval u3.value
25261#define nd_rval u2.value
25262#define nd_tag u1.id
25263#define NEW_NODE(t,a0,a1,a2,loc) rb_node_newnode((t),(VALUE)(a0),(VALUE)(a1),(VALUE)(a2),loc)
25264#define NEW_NODE_WITH_LOCALS(t,a1,a2,loc) node_newnode_with_locals(p, (t),(VALUE)(a1),(VALUE)(a2),loc)
25265#define NEW_DEFN(i,a,d,loc) NEW_NODE(NODE_DEFN,0,i,NEW_SCOPE(a,d,loc),loc)
25266#define NEW_DEFS(r,i,a,d,loc) NEW_NODE(NODE_DEFS,r,i,NEW_SCOPE(a,d,loc),loc)
25267#define NEW_SCOPE(a,b,loc) NEW_NODE_WITH_LOCALS(NODE_SCOPE,b,a,loc)
25268#define NEW_BLOCK(a,loc) NEW_NODE(NODE_BLOCK,a,0,0,loc)
25269#define NEW_IF(c,t,e,loc) NEW_NODE(NODE_IF,c,t,e,loc)
25270#define NEW_UNLESS(c,t,e,loc) NEW_NODE(NODE_UNLESS,c,t,e,loc)
25271#define NEW_CASE(h,b,loc) NEW_NODE(NODE_CASE,h,b,0,loc)
25272#define NEW_CASE2(b,loc) NEW_NODE(NODE_CASE2,0,b,0,loc)
25273#define NEW_CASE3(h,b,loc) NEW_NODE(NODE_CASE3,h,b,0,loc)
25274#define NEW_WHEN(c,t,e,loc) NEW_NODE(NODE_WHEN,c,t,e,loc)
25275#define NEW_IN(c,t,e,loc) NEW_NODE(NODE_IN,c,t,e,loc)
25276#define NEW_WHILE(c,b,n,loc) NEW_NODE(NODE_WHILE,c,b,n,loc)
25277#define NEW_UNTIL(c,b,n,loc) NEW_NODE(NODE_UNTIL,c,b,n,loc)
25278#define NEW_FOR(i,b,loc) NEW_NODE(NODE_FOR,0,b,i,loc)
25279#define NEW_FOR_MASGN(v,loc) NEW_NODE(NODE_FOR_MASGN,v,0,0,loc)
25280#define NEW_ITER(a,b,loc) NEW_NODE(NODE_ITER,0,NEW_SCOPE(a,b,loc),0,loc)
25281#define NEW_LAMBDA(a,b,loc) NEW_NODE(NODE_LAMBDA,0,NEW_SCOPE(a,b,loc),0,loc)
25282#define NEW_BREAK(s,loc) NEW_NODE(NODE_BREAK,s,0,0,loc)
25283#define NEW_NEXT(s,loc) NEW_NODE(NODE_NEXT,s,0,0,loc)
25284#define NEW_REDO(loc) NEW_NODE(NODE_REDO,0,0,0,loc)
25285#define NEW_RETRY(loc) NEW_NODE(NODE_RETRY,0,0,0,loc)
25286#define NEW_BEGIN(b,loc) NEW_NODE(NODE_BEGIN,0,b,0,loc)
25287#define NEW_RESCUE(b,res,e,loc) NEW_NODE(NODE_RESCUE,b,res,e,loc)
25288#define NEW_RESBODY(a,ex,n,loc) NEW_NODE(NODE_RESBODY,n,ex,a,loc)
25289#define NEW_ENSURE(b,en,loc) NEW_NODE(NODE_ENSURE,b,0,en,loc)
25290#define NEW_RETURN(s,loc) NEW_NODE(NODE_RETURN,s,0,0,loc)
25291#define NEW_YIELD(a,loc) NEW_NODE(NODE_YIELD,a,0,0,loc)
25292#define NEW_LIST(a,loc) NEW_NODE(NODE_LIST,a,1,0,loc)
25293#define NEW_ZLIST(loc) NEW_NODE(NODE_ZLIST,0,0,0,loc)
25294#define NEW_HASH(a,loc) NEW_NODE(NODE_HASH,a,0,0,loc)
25295#define NEW_MASGN(l,r,loc) NEW_NODE(NODE_MASGN,l,0,r,loc)
25296#define NEW_GASGN(v,val,loc) NEW_NODE(NODE_GASGN,v,val,v,loc)
25297#define NEW_LASGN(v,val,loc) NEW_NODE(NODE_LASGN,v,val,0,loc)
25298#define NEW_DASGN(v,val,loc) NEW_NODE(NODE_DASGN,v,val,0,loc)
25299#define NEW_IASGN(v,val,loc) NEW_NODE(NODE_IASGN,v,val,0,loc)
25300#define NEW_CDECL(v,val,path,loc) NEW_NODE(NODE_CDECL,v,val,path,loc)
25301#define NEW_CVASGN(v,val,loc) NEW_NODE(NODE_CVASGN,v,val,0,loc)
25302#define NEW_OP_ASGN1(p,id,a,loc) NEW_NODE(NODE_OP_ASGN1,p,id,a,loc)
25303#define NEW_OP_ASGN2(r,t,i,o,val,loc) NEW_NODE(NODE_OP_ASGN2,r,val,NEW_OP_ASGN22(i,o,t,loc),loc)
25304#define NEW_OP_ASGN22(i,o,t,loc) NEW_NODE(NODE_OP_ASGN2,i,o,t,loc)
25305#define NEW_OP_ASGN_OR(i,val,loc) NEW_NODE(NODE_OP_ASGN_OR,i,val,0,loc)
25306#define NEW_OP_ASGN_AND(i,val,loc) NEW_NODE(NODE_OP_ASGN_AND,i,val,0,loc)
25307#define NEW_OP_CDECL(v,op,val,loc) NEW_NODE(NODE_OP_CDECL,v,val,op,loc)
25308#define NEW_GVAR(v,loc) NEW_NODE(NODE_GVAR,v,0,v,loc)
25309#define NEW_LVAR(v,loc) NEW_NODE(NODE_LVAR,v,0,0,loc)
25310#define NEW_DVAR(v,loc) NEW_NODE(NODE_DVAR,v,0,0,loc)
25311#define NEW_IVAR(v,loc) NEW_NODE(NODE_IVAR,v,0,0,loc)
25312#define NEW_CONST(v,loc) NEW_NODE(NODE_CONST,v,0,0,loc)
25313#define NEW_CVAR(v,loc) NEW_NODE(NODE_CVAR,v,0,0,loc)
25314#define NEW_NTH_REF(n,loc) NEW_NODE(NODE_NTH_REF,0,n,0,loc)
25315#define NEW_BACK_REF(n,loc) NEW_NODE(NODE_BACK_REF,0,n,0,loc)
25316#define NEW_MATCH(c,loc) NEW_NODE(NODE_MATCH,c,0,0,loc)
25317#define NEW_MATCH2(n1,n2,loc) NEW_NODE(NODE_MATCH2,n1,n2,0,loc)
25318#define NEW_MATCH3(r,n2,loc) NEW_NODE(NODE_MATCH3,r,n2,0,loc)
25319#define NEW_LIT(l,loc) NEW_NODE(NODE_LIT,l,0,0,loc)
25320#define NEW_STR(s,loc) NEW_NODE(NODE_STR,s,0,0,loc)
25321#define NEW_DSTR(s,loc) NEW_NODE(NODE_DSTR,s,1,0,loc)
25322#define NEW_XSTR(s,loc) NEW_NODE(NODE_XSTR,s,0,0,loc)
25323#define NEW_DXSTR(s,loc) NEW_NODE(NODE_DXSTR,s,0,0,loc)
25324#define NEW_DSYM(s,loc) NEW_NODE(NODE_DSYM,s,0,0,loc)
25325#define NEW_EVSTR(n,loc) NEW_NODE(NODE_EVSTR,0,(n),0,loc)
25326#define NEW_CALL(r,m,a,loc) NEW_NODE(NODE_CALL,r,m,a,loc)
25327#define NEW_OPCALL(r,m,a,loc) NEW_NODE(NODE_OPCALL,r,m,a,loc)
25328#define NEW_FCALL(m,a,loc) NEW_NODE(NODE_FCALL,0,m,a,loc)
25329#define NEW_VCALL(m,loc) NEW_NODE(NODE_VCALL,0,m,0,loc)
25330#define NEW_SUPER(a,loc) NEW_NODE(NODE_SUPER,0,0,a,loc)
25331#define NEW_ZSUPER(loc) NEW_NODE(NODE_ZSUPER,0,0,0,loc)
25332#define NEW_ARGS_AUX(r,b,loc) NEW_NODE(NODE_ARGS_AUX,r,b,0,loc)
25333#define NEW_OPT_ARG(i,v,loc) NEW_NODE(NODE_OPT_ARG,i,v,0,loc)
25334#define NEW_KW_ARG(i,v,loc) NEW_NODE(NODE_KW_ARG,i,v,0,loc)
25335#define NEW_POSTARG(i,v,loc) NEW_NODE(NODE_POSTARG,i,v,0,loc)
25336#define NEW_ARGSCAT(a,b,loc) NEW_NODE(NODE_ARGSCAT,a,b,0,loc)
25337#define NEW_ARGSPUSH(a,b,loc) NEW_NODE(NODE_ARGSPUSH,a,b,0,loc)
25338#define NEW_SPLAT(a,loc) NEW_NODE(NODE_SPLAT,a,0,0,loc)
25339#define NEW_BLOCK_PASS(b,loc) NEW_NODE(NODE_BLOCK_PASS,0,b,0,loc)
25340#define NEW_ALIAS(n,o,loc) NEW_NODE(NODE_ALIAS,n,o,0,loc)
25341#define NEW_VALIAS(n,o,loc) NEW_NODE(NODE_VALIAS,n,o,0,loc)
25342#define NEW_UNDEF(i,loc) NEW_NODE(NODE_UNDEF,0,i,0,loc)
25343#define NEW_CLASS(n,b,s,loc) NEW_NODE(NODE_CLASS,n,NEW_SCOPE(0,b,loc),(s),loc)
25344#define NEW_SCLASS(r,b,loc) NEW_NODE(NODE_SCLASS,r,NEW_SCOPE(0,b,loc),0,loc)
25345#define NEW_MODULE(n,b,loc) NEW_NODE(NODE_MODULE,n,NEW_SCOPE(0,b,loc),0,loc)
25346#define NEW_COLON2(c,i,loc) NEW_NODE(NODE_COLON2,c,i,0,loc)
25347#define NEW_COLON3(i,loc) NEW_NODE(NODE_COLON3,0,i,0,loc)
25348#define NEW_DOT2(b,e,loc) NEW_NODE(NODE_DOT2,b,e,0,loc)
25349#define NEW_DOT3(b,e,loc) NEW_NODE(NODE_DOT3,b,e,0,loc)
25350#define NEW_SELF(loc) NEW_NODE(NODE_SELF,0,0,1,loc)
25351#define NEW_NIL(loc) NEW_NODE(NODE_NIL,0,0,0,loc)
25352#define NEW_TRUE(loc) NEW_NODE(NODE_TRUE,0,0,0,loc)
25353#define NEW_FALSE(loc) NEW_NODE(NODE_FALSE,0,0,0,loc)
25354#define NEW_ERRINFO(loc) NEW_NODE(NODE_ERRINFO,0,0,0,loc)
25355#define NEW_DEFINED(e,loc) NEW_NODE(NODE_DEFINED,e,0,0,loc)
25356#define NEW_PREEXE(b,loc) NEW_SCOPE(b,loc)
25357#define NEW_POSTEXE(b,loc) NEW_NODE(NODE_POSTEXE,0,b,0,loc)
25358#define NEW_ATTRASGN(r,m,a,loc) NEW_NODE(NODE_ATTRASGN,r,m,a,loc)
25359#define NODE_SPECIAL_REQUIRED_KEYWORD ((NODE *)-1)
25360#define NODE_REQUIRED_KEYWORD_P(node) ((node)->nd_value == NODE_SPECIAL_REQUIRED_KEYWORD)
25361#define NODE_SPECIAL_NO_NAME_REST ((NODE *)-1)
25362#define NODE_NAMED_REST_P(node) ((node) != NODE_SPECIAL_NO_NAME_REST)
25363#define NODE_SPECIAL_EXCESSIVE_COMMA ((ID)1)
25364#define NODE_SPECIAL_NO_REST_KEYWORD ((NODE *)-1)
25365#pragma GCC visibility push(default)
25366#pragma GCC visibility pop
25367#define RUBY_ATOMIC_H
25368#define RUBY_ATOMIC_GENERIC_MACRO 1
25369#define RUBY_ATOMIC_FETCH_ADD(var,val) rbimpl_atomic_fetch_add(&(var), (val))
25370#define RUBY_ATOMIC_FETCH_SUB(var,val) rbimpl_atomic_fetch_sub(&(var), (val))
25371#define RUBY_ATOMIC_OR(var,val) rbimpl_atomic_or(&(var), (val))
25372#define RUBY_ATOMIC_EXCHANGE(var,val) rbimpl_atomic_exchange(&(var), (val))
25373#define RUBY_ATOMIC_CAS(var,oldval,newval) rbimpl_atomic_cas(&(var), (oldval), (newval))
25374#define RUBY_ATOMIC_SET(var,val) rbimpl_atomic_set(&(var), (val))
25375#define RUBY_ATOMIC_ADD(var,val) rbimpl_atomic_add(&(var), (val))
25376#define RUBY_ATOMIC_SUB(var,val) rbimpl_atomic_sub(&(var), (val))
25377#define RUBY_ATOMIC_INC(var) rbimpl_atomic_inc(&(var))
25378#define RUBY_ATOMIC_DEC(var) rbimpl_atomic_dec(&(var))
25379#define RUBY_ATOMIC_SIZE_INC(var) rbimpl_atomic_size_inc(&(var))
25380#define RUBY_ATOMIC_SIZE_DEC(var) rbimpl_atomic_size_dec(&(var))
25381#define RUBY_ATOMIC_SIZE_EXCHANGE(var,val) rbimpl_atomic_size_exchange(&(var), (val))
25382#define RUBY_ATOMIC_SIZE_CAS(var,oldval,newval) rbimpl_atomic_size_cas(&(var), (oldval), (newval))
25383#define RUBY_ATOMIC_SIZE_ADD(var,val) rbimpl_atomic_size_add(&(var), (val))
25384#define RUBY_ATOMIC_SIZE_SUB(var,val) rbimpl_atomic_size_sub(&(var), (val))
25385#define RUBY_ATOMIC_PTR_EXCHANGE(var,val) RBIMPL_CAST(rbimpl_atomic_ptr_exchange((void **)&(var), (void *)val))
25386#define RUBY_ATOMIC_PTR_CAS(var,oldval,newval) RBIMPL_CAST(rbimpl_atomic_ptr_cas((void **)&(var), (oldval), (newval)))
25387#define RUBY_ATOMIC_VALUE_EXCHANGE(var,val) rbimpl_atomic_value_exchange(&(var), (val))
25388#define RUBY_ATOMIC_VALUE_CAS(var,oldval,newval) rbimpl_atomic_value_cas(&(var), (oldval), (newval))
25389#define ATOMIC_ADD(var,val) RUBY_ATOMIC_ADD(var, val)
25390#define ATOMIC_CAS(var,oldval,newval) RUBY_ATOMIC_CAS(var, oldval, newval)
25391#define ATOMIC_DEC(var) RUBY_ATOMIC_DEC(var)
25392#define ATOMIC_EXCHANGE(var,val) RUBY_ATOMIC_EXCHANGE(var, val)
25393#define ATOMIC_FETCH_ADD(var,val) RUBY_ATOMIC_FETCH_ADD(var, val)
25394#define ATOMIC_FETCH_SUB(var,val) RUBY_ATOMIC_FETCH_SUB(var, val)
25395#define ATOMIC_INC(var) RUBY_ATOMIC_INC(var)
25396#define ATOMIC_OR(var,val) RUBY_ATOMIC_OR(var, val)
25397#define ATOMIC_PTR_CAS(var,oldval,newval) RUBY_ATOMIC_PTR_CAS(var, oldval, newval)
25398#define ATOMIC_PTR_EXCHANGE(var,val) RUBY_ATOMIC_PTR_EXCHANGE(var, val)
25399#define ATOMIC_SET(var,val) RUBY_ATOMIC_SET(var, val)
25400#define ATOMIC_SIZE_ADD(var,val) RUBY_ATOMIC_SIZE_ADD(var, val)
25401#define ATOMIC_SIZE_CAS(var,oldval,newval) RUBY_ATOMIC_SIZE_CAS(var, oldval, newval)
25402#define ATOMIC_SIZE_DEC(var) RUBY_ATOMIC_SIZE_DEC(var)
25403#define ATOMIC_SIZE_EXCHANGE(var,val) RUBY_ATOMIC_SIZE_EXCHANGE(var, val)
25404#define ATOMIC_SIZE_INC(var) RUBY_ATOMIC_SIZE_INC(var)
25405#define ATOMIC_SIZE_SUB(var,val) RUBY_ATOMIC_SIZE_SUB(var, val)
25406#define ATOMIC_SUB(var,val) RUBY_ATOMIC_SUB(var, val)
25407#define ATOMIC_VALUE_CAS(var,oldval,val) RUBY_ATOMIC_VALUE_CAS(var, oldval, val)
25408#define ATOMIC_VALUE_EXCHANGE(var,val) RUBY_ATOMIC_VALUE_EXCHANGE(var, val)
25409#define RUBY_VM_OPTS_H
25410#define OPT_TAILCALL_OPTIMIZATION 0
25411#define OPT_PEEPHOLE_OPTIMIZATION 1
25412#define OPT_SPECIALISED_INSTRUCTION 1
25413#define OPT_INLINE_CONST_CACHE 1
25414#define OPT_FROZEN_STRING_LITERAL 0
25415#define OPT_DEBUG_FROZEN_STRING_LITERAL 0
25416#define OPT_THREADED_CODE 0
25417#define OPT_DIRECT_THREADED_CODE (OPT_THREADED_CODE == 0)
25418#define OPT_TOKEN_THREADED_CODE (OPT_THREADED_CODE == 1)
25419#define OPT_CALL_THREADED_CODE (OPT_THREADED_CODE == 2)
25420#define OPT_CHECKED_RUN 1
25421#define OPT_INLINE_METHOD_CACHE 1
25422#define OPT_GLOBAL_METHOD_CACHE 1
25423#define OPT_BLOCKINLINING 0
25424#define OPT_IC_FOR_IVAR 1
25425#define OPT_OPERANDS_UNIFICATION 1
25426#define OPT_INSTRUCTIONS_UNIFICATION 0
25427#define OPT_UNIFY_ALL_COMBINATION 0
25428#define OPT_STACK_CACHING 0
25429#define OPT_SUPPORT_JOKE 0
25430#define OPT_SUPPORT_CALL_C_FUNCTION 0
25431#define VM_COLLECT_USAGE_DETAILS 0
25432#define RUBY_THREAD_NATIVE_H 1
25433#define _PTHREAD_H 1
25434#define _SCHED_H 1
25435#define __need_size_t
25436#define __need_NULL
25437#undef __need_ptrdiff_t
25438#undef __need_size_t
25439#undef __need_wchar_t
25440#undef NULL
25441#define NULL ((void *)0)
25442#undef __need_NULL
25443#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
25444#define _BITS_SCHED_H 1
25445#define SCHED_OTHER 0
25446#define SCHED_FIFO 1
25447#define SCHED_RR 2
25448#define SCHED_BATCH 3
25449#define SCHED_ISO 4
25450#define SCHED_IDLE 5
25451#define SCHED_DEADLINE 6
25452#define SCHED_RESET_ON_FORK 0x40000000
25453#define CSIGNAL 0x000000ff
25454#define CLONE_VM 0x00000100
25455#define CLONE_FS 0x00000200
25456#define CLONE_FILES 0x00000400
25457#define CLONE_SIGHAND 0x00000800
25458#define CLONE_PIDFD 0x00001000
25459#define CLONE_PTRACE 0x00002000
25460#define CLONE_VFORK 0x00004000
25461#define CLONE_PARENT 0x00008000
25462#define CLONE_THREAD 0x00010000
25463#define CLONE_NEWNS 0x00020000
25464#define CLONE_SYSVSEM 0x00040000
25465#define CLONE_SETTLS 0x00080000
25466#define CLONE_PARENT_SETTID 0x00100000
25467#define CLONE_CHILD_CLEARTID 0x00200000
25468#define CLONE_DETACHED 0x00400000
25469#define CLONE_UNTRACED 0x00800000
25470#define CLONE_CHILD_SETTID 0x01000000
25471#define CLONE_NEWCGROUP 0x02000000
25472#define CLONE_NEWUTS 0x04000000
25473#define CLONE_NEWIPC 0x08000000
25474#define CLONE_NEWUSER 0x10000000
25475#define CLONE_NEWPID 0x20000000
25476#define CLONE_NEWNET 0x40000000
25477#define CLONE_IO 0x80000000
25478#define _BITS_TYPES_STRUCT_SCHED_PARAM 1
25479#define _BITS_CPU_SET_H 1
25480#define __CPU_SETSIZE 1024
25481#define __NCPUBITS (8 * sizeof (__cpu_mask))
25482#define __CPUELT(cpu) ((cpu) / __NCPUBITS)
25483#define __CPUMASK(cpu) ((__cpu_mask) 1 << ((cpu) % __NCPUBITS))
25484#define __CPU_ZERO_S(setsize,cpusetp) do __builtin_memset (cpusetp, '\0', setsize); while (0)
25485#define __CPU_SET_S(cpu,setsize,cpusetp) (__extension__ ({ size_t __cpu = (cpu); __cpu / 8 < (setsize) ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] |= __CPUMASK (__cpu)) : 0; }))
25486#define __CPU_CLR_S(cpu,setsize,cpusetp) (__extension__ ({ size_t __cpu = (cpu); __cpu / 8 < (setsize) ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] &= ~__CPUMASK (__cpu)) : 0; }))
25487#define __CPU_ISSET_S(cpu,setsize,cpusetp) (__extension__ ({ size_t __cpu = (cpu); __cpu / 8 < (setsize) ? ((((const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] & __CPUMASK (__cpu))) != 0 : 0; }))
25488#define __CPU_COUNT_S(setsize,cpusetp) __sched_cpucount (setsize, cpusetp)
25489#define __CPU_EQUAL_S(setsize,cpusetp1,cpusetp2) (__builtin_memcmp (cpusetp1, cpusetp2, setsize) == 0)
25490#define __CPU_OP_S(setsize,destset,srcset1,srcset2,op) (__extension__ ({ cpu_set_t *__dest = (destset); const __cpu_mask *__arr1 = (srcset1)->__bits; const __cpu_mask *__arr2 = (srcset2)->__bits; size_t __imax = (setsize) / sizeof (__cpu_mask); size_t __i; for (__i = 0; __i < __imax; ++__i) ((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i]; __dest; }))
25491#define __CPU_ALLOC_SIZE(count) ((((count) + __NCPUBITS - 1) / __NCPUBITS) * sizeof (__cpu_mask))
25492#define __CPU_ALLOC(count) __sched_cpualloc (count)
25493#define __CPU_FREE(cpuset) __sched_cpufree (cpuset)
25494#define sched_priority sched_priority
25495#define __sched_priority sched_priority
25496#define CPU_SETSIZE __CPU_SETSIZE
25497#define CPU_SET(cpu,cpusetp) __CPU_SET_S (cpu, sizeof (cpu_set_t), cpusetp)
25498#define CPU_CLR(cpu,cpusetp) __CPU_CLR_S (cpu, sizeof (cpu_set_t), cpusetp)
25499#define CPU_ISSET(cpu,cpusetp) __CPU_ISSET_S (cpu, sizeof (cpu_set_t), cpusetp)
25500#define CPU_ZERO(cpusetp) __CPU_ZERO_S (sizeof (cpu_set_t), cpusetp)
25501#define CPU_COUNT(cpusetp) __CPU_COUNT_S (sizeof (cpu_set_t), cpusetp)
25502#define CPU_SET_S(cpu,setsize,cpusetp) __CPU_SET_S (cpu, setsize, cpusetp)
25503#define CPU_CLR_S(cpu,setsize,cpusetp) __CPU_CLR_S (cpu, setsize, cpusetp)
25504#define CPU_ISSET_S(cpu,setsize,cpusetp) __CPU_ISSET_S (cpu, setsize, cpusetp)
25505#define CPU_ZERO_S(setsize,cpusetp) __CPU_ZERO_S (setsize, cpusetp)
25506#define CPU_COUNT_S(setsize,cpusetp) __CPU_COUNT_S (setsize, cpusetp)
25507#define CPU_EQUAL(cpusetp1,cpusetp2) __CPU_EQUAL_S (sizeof (cpu_set_t), cpusetp1, cpusetp2)
25508#define CPU_EQUAL_S(setsize,cpusetp1,cpusetp2) __CPU_EQUAL_S (setsize, cpusetp1, cpusetp2)
25509#define CPU_AND(destset,srcset1,srcset2) __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, &)
25510#define CPU_OR(destset,srcset1,srcset2) __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, |)
25511#define CPU_XOR(destset,srcset1,srcset2) __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, ^)
25512#define CPU_AND_S(setsize,destset,srcset1,srcset2) __CPU_OP_S (setsize, destset, srcset1, srcset2, &)
25513#define CPU_OR_S(setsize,destset,srcset1,srcset2) __CPU_OP_S (setsize, destset, srcset1, srcset2, |)
25514#define CPU_XOR_S(setsize,destset,srcset1,srcset2) __CPU_OP_S (setsize, destset, srcset1, srcset2, ^)
25515#define CPU_ALLOC_SIZE(count) __CPU_ALLOC_SIZE (count)
25516#define CPU_ALLOC(count) __CPU_ALLOC (count)
25517#define CPU_FREE(cpuset) __CPU_FREE (cpuset)
25518#define __WORDSIZE 64
25519#define __WORDSIZE_TIME64_COMPAT32 1
25520#define __SYSCALL_WORDSIZE 64
25521#define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE
25522#define PTHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED
25523#define PTHREAD_MUTEX_INITIALIZER { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_TIMED_NP) } }
25524#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_RECURSIVE_NP) } }
25525#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_ERRORCHECK_NP) } }
25526#define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_ADAPTIVE_NP) } }
25527#define PTHREAD_RWLOCK_INITIALIZER { { __PTHREAD_RWLOCK_INITIALIZER (PTHREAD_RWLOCK_DEFAULT_NP) } }
25528#define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP { { __PTHREAD_RWLOCK_INITIALIZER (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP) } }
25529#define PTHREAD_INHERIT_SCHED PTHREAD_INHERIT_SCHED
25530#define PTHREAD_EXPLICIT_SCHED PTHREAD_EXPLICIT_SCHED
25531#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM
25532#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS
25533#define PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_PRIVATE
25534#define PTHREAD_PROCESS_SHARED PTHREAD_PROCESS_SHARED
25535#define PTHREAD_COND_INITIALIZER { { {0}, {0}, {0, 0}, {0, 0}, 0, 0, {0, 0} } }
25536#define PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE
25537#define PTHREAD_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE
25538#define PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED
25539#define PTHREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS
25540#define PTHREAD_CANCELED ((void *) -1)
25541#define PTHREAD_ONCE_INIT 0
25542#define PTHREAD_BARRIER_SERIAL_THREAD -1
25543#define PTHREAD_ATTR_NO_SIGMASK_NP (-1)
25544#define __cleanup_fct_attribute
25545#define pthread_cleanup_push(routine,arg) do { __pthread_unwind_buf_t __cancel_buf; void (*__cancel_routine) (void *) = (routine); void *__cancel_arg = (arg); int __not_first_call = __sigsetjmp_cancel (__cancel_buf.__cancel_jmp_buf, 0); if (__glibc_unlikely (__not_first_call)) { __cancel_routine (__cancel_arg); __pthread_unwind_next (&__cancel_buf); } __pthread_register_cancel (&__cancel_buf); do {
25546#define pthread_cleanup_pop(execute) do { } while (0); } while (0); __pthread_unregister_cancel (&__cancel_buf); if (execute) __cancel_routine (__cancel_arg); } while (0)
25547#define pthread_cleanup_push_defer_np(routine,arg) do { __pthread_unwind_buf_t __cancel_buf; void (*__cancel_routine) (void *) = (routine); void *__cancel_arg = (arg); int __not_first_call = __sigsetjmp_cancel (__cancel_buf.__cancel_jmp_buf, 0); if (__glibc_unlikely (__not_first_call)) { __cancel_routine (__cancel_arg); __pthread_unwind_next (&__cancel_buf); } __pthread_register_cancel_defer (&__cancel_buf); do {
25548#define pthread_cleanup_pop_restore_np(execute) do { } while (0); } while (0); __pthread_unregister_cancel_restore (&__cancel_buf); if (execute) __cancel_routine (__cancel_arg); } while (0)
25549#pragma GCC visibility push(default)
25550#pragma GCC visibility pop
25551#define VM_INSN_INFO_TABLE_IMPL 2
25552#define RUBY_NSIG NSIG
25553#define RUBY_SIGCHLD (SIGCLD)
25554#define SIGCHLD_LOSSY (0)
25555#define WAITPID_USE_SIGCHLD (RUBY_SIGCHLD || SIGCHLD_LOSSY)
25556#define USE_SIGALTSTACK
25557#define RB_ALTSTACK_INIT(var,altstack) var = rb_register_sigaltstack(altstack)
25558#define RB_ALTSTACK_FREE(var) free(var)
25559#define RB_ALTSTACK(var) var
25560#define RUBY_THREAD_PTHREAD_H
25561#define RB_NATIVETHREAD_LOCK_INIT PTHREAD_MUTEX_INITIALIZER
25562#define RB_NATIVETHREAD_COND_INIT PTHREAD_COND_INITIALIZER
25563#undef except
25564#undef try
25565#undef leave
25566#undef finally
25567#define RB_THREAD_LOCAL_SPECIFIER __thread
25568#pragma GCC visibility push(default)
25569#pragma GCC visibility pop
25570#define RUBY_VM_THREAD_MODEL 2
25571#define TAG_NONE RUBY_TAG_NONE
25572#define TAG_RETURN RUBY_TAG_RETURN
25573#define TAG_BREAK RUBY_TAG_BREAK
25574#define TAG_NEXT RUBY_TAG_NEXT
25575#define TAG_RETRY RUBY_TAG_RETRY
25576#define TAG_REDO RUBY_TAG_REDO
25577#define TAG_RAISE RUBY_TAG_RAISE
25578#define TAG_THROW RUBY_TAG_THROW
25579#define TAG_FATAL RUBY_TAG_FATAL
25580#define TAG_MASK RUBY_TAG_MASK
25581#define CoreDataFromValue(obj,type) (type*)DATA_PTR(obj)
25582#define GetCoreDataFromValue(obj,type,ptr) ((ptr) = CoreDataFromValue((obj), type))
25583#define PATHOBJ_PATH 0
25584#define PATHOBJ_REALPATH 1
25585#define ISEQ_BODY(iseq) ((iseq)->body)
25586#define USE_LAZY_LOAD 0
25587#define GetVMPtr(obj,ptr) GetCoreDataFromValue((obj), rb_vm_t, (ptr))
25588#define VM_GLOBAL_CC_CACHE_TABLE_SIZE 1023
25589#define RUBY_VM_SIZE_ALIGN 4096
25590#define RUBY_VM_THREAD_VM_STACK_SIZE ( 128 * 1024 * sizeof(VALUE))
25591#define RUBY_VM_THREAD_VM_STACK_SIZE_MIN ( 2 * 1024 * sizeof(VALUE))
25592#define RUBY_VM_THREAD_MACHINE_STACK_SIZE ( 128 * 1024 * sizeof(VALUE))
25593#define RUBY_VM_THREAD_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE))
25594#define RUBY_VM_FIBER_VM_STACK_SIZE ( 16 * 1024 * sizeof(VALUE))
25595#define RUBY_VM_FIBER_VM_STACK_SIZE_MIN ( 2 * 1024 * sizeof(VALUE))
25596#define RUBY_VM_FIBER_MACHINE_STACK_SIZE ( 64 * 1024 * sizeof(VALUE))
25597#define RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE))
25598#define INTEGER_REDEFINED_OP_FLAG (1 << 0)
25599#define FLOAT_REDEFINED_OP_FLAG (1 << 1)
25600#define STRING_REDEFINED_OP_FLAG (1 << 2)
25601#define ARRAY_REDEFINED_OP_FLAG (1 << 3)
25602#define HASH_REDEFINED_OP_FLAG (1 << 4)
25603#define SYMBOL_REDEFINED_OP_FLAG (1 << 6)
25604#define TIME_REDEFINED_OP_FLAG (1 << 7)
25605#define REGEXP_REDEFINED_OP_FLAG (1 << 8)
25606#define NIL_REDEFINED_OP_FLAG (1 << 9)
25607#define TRUE_REDEFINED_OP_FLAG (1 << 10)
25608#define FALSE_REDEFINED_OP_FLAG (1 << 11)
25609#define PROC_REDEFINED_OP_FLAG (1 << 12)
25610#define BASIC_OP_UNREDEFINED_P(op,klass) (LIKELY((GET_VM()->redefined_flag[(op)]&(klass)) == 0))
25611#define VM_DEBUG_BP_CHECK 0
25612#define VM_DEBUG_VERIFY_METHOD_CACHE (VMDEBUG != 0)
25613#define rb_execution_context_t rb_execution_context_t
25614#define VM_CORE_H_EC_DEFINED 1
25615#define VM_DEFINECLASS_TYPE(x) ((rb_vm_defineclass_type_t)(x) & VM_DEFINECLASS_TYPE_MASK)
25616#define VM_DEFINECLASS_FLAG_SCOPED 0x08
25617#define VM_DEFINECLASS_FLAG_HAS_SUPERCLASS 0x10
25618#define VM_DEFINECLASS_SCOPED_P(x) ((x) & VM_DEFINECLASS_FLAG_SCOPED)
25619#define VM_DEFINECLASS_HAS_SUPERCLASS_P(x) ((x) & VM_DEFINECLASS_FLAG_HAS_SUPERCLASS)
25620#pragma GCC visibility push(default)
25621#pragma GCC visibility pop
25622#define GetProcPtr(obj,ptr) GetCoreDataFromValue((obj), rb_proc_t, (ptr))
25623#pragma GCC visibility push(default)
25624#pragma GCC visibility pop
25625#define GetBindingPtr(obj,ptr) GetCoreDataFromValue((obj), rb_binding_t, (ptr))
25626#define VM_CHECKMATCH_TYPE_MASK 0x03
25627#define VM_CHECKMATCH_ARRAY 0x04
25628#define FUNC_FASTCALL(x) x
25629#define VM_TAGGED_PTR_SET(p,tag) ((VALUE)(p) | (tag))
25630#define VM_TAGGED_PTR_REF(v,mask) ((void *)((v) & ~mask))
25631#define GC_GUARDED_PTR(p) VM_TAGGED_PTR_SET((p), 0x01)
25632#define GC_GUARDED_PTR_REF(p) VM_TAGGED_PTR_REF((p), 0x03)
25633#define GC_GUARDED_PTR_P(p) (((VALUE)(p)) & 0x01)
25634#define VM_ENV_DATA_SIZE ( 3)
25635#define VM_ENV_DATA_INDEX_ME_CREF (-2)
25636#define VM_ENV_DATA_INDEX_SPECVAL (-1)
25637#define VM_ENV_DATA_INDEX_FLAGS ( 0)
25638#define VM_ENV_DATA_INDEX_ENV ( 1)
25639#define VM_ENV_INDEX_LAST_LVAR (-VM_ENV_DATA_SIZE)
25640#define RUBYVM_CFUNC_FRAME_P(cfp) (VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_CFUNC)
25641#define VM_GUARDED_PREV_EP(ep) GC_GUARDED_PTR(ep)
25642#define VM_BLOCK_HANDLER_NONE 0
25643#define RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp) ((cfp)+1)
25644#define RUBY_VM_NEXT_CONTROL_FRAME(cfp) ((cfp)-1)
25645#define RUBY_VM_VALID_CONTROL_FRAME_P(cfp,ecfp) ((void *)(ecfp) > (void *)(cfp))
25646#define SDR() rb_vmdebug_stack_dump_raw(GET_EC(), GET_EC()->cfp)
25647#define SDR2(cfp) rb_vmdebug_stack_dump_raw(GET_EC(), (cfp))
25648#pragma GCC visibility push(default)
25649#pragma GCC visibility pop
25650#define rb_vm_register_special_exception(sp,e,m) rb_vm_register_special_exception_str(sp, e, rb_usascii_str_new_static((m), (long)rb_strlen_lit(m)))
25651#define sysstack_error GET_VM()->special_exceptions[ruby_error_sysstack]
25652#define CHECK_VM_STACK_OVERFLOW0(cfp,sp,margin) do { STATIC_ASSERT(sizeof_sp, sizeof(*(sp)) == sizeof(VALUE)); STATIC_ASSERT(sizeof_cfp, sizeof(*(cfp)) == sizeof(rb_control_frame_t)); const struct rb_control_frame_struct *bound = (void *)&(sp)[(margin)]; if (UNLIKELY((cfp) <= &bound[1])) { vm_stackoverflow(); } } while (0)
25653#define CHECK_VM_STACK_OVERFLOW(cfp,margin) CHECK_VM_STACK_OVERFLOW0((cfp), (cfp)->sp, (margin))
25654#pragma GCC visibility push(default)
25655#pragma GCC visibility pop
25656#define GET_VM() rb_current_vm()
25657#define GET_RACTOR() rb_current_ractor()
25658#define GET_THREAD() rb_current_thread()
25659#define GET_EC() rb_current_execution_context(true)
25660#define RUBY_VM_SET_TIMER_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TIMER_INTERRUPT_MASK)
25661#define RUBY_VM_SET_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, PENDING_INTERRUPT_MASK)
25662#define RUBY_VM_SET_POSTPONED_JOB_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, POSTPONED_JOB_INTERRUPT_MASK)
25663#define RUBY_VM_SET_TRAP_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TRAP_INTERRUPT_MASK)
25664#define RUBY_VM_SET_TERMINATE_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TERMINATE_INTERRUPT_MASK)
25665#define RUBY_VM_SET_VM_BARRIER_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, VM_BARRIER_INTERRUPT_MASK)
25666#define RUBY_VM_INTERRUPTED(ec) ((ec)->interrupt_flag & ~(ec)->interrupt_mask & (PENDING_INTERRUPT_MASK|TRAP_INTERRUPT_MASK))
25667#define RUBY_VM_CHECK_INTS(ec) rb_vm_check_ints(ec)
25668#define EXEC_EVENT_HOOK_ORIG(ec_,hooks_,flag_,self_,id_,called_id_,klass_,data_,pop_p_) do { const rb_event_flag_t flag_arg_ = (flag_); rb_hook_list_t *hooks_arg_ = (hooks_); if (UNLIKELY((hooks_arg_)->events & (flag_arg_))) { rb_exec_event_hook_orig(ec_, hooks_arg_, flag_arg_, self_, id_, called_id_, klass_, data_, pop_p_); } } while (0)
25669#define EXEC_EVENT_HOOK(ec_,flag_,self_,id_,called_id_,klass_,data_) EXEC_EVENT_HOOK_ORIG(ec_, rb_ec_ractor_hooks(ec_), flag_, self_, id_, called_id_, klass_, data_, 0)
25670#define EXEC_EVENT_HOOK_AND_POP_FRAME(ec_,flag_,self_,id_,called_id_,klass_,data_) EXEC_EVENT_HOOK_ORIG(ec_, rb_ec_ractor_hooks(ec_), flag_, self_, id_, called_id_, klass_, data_, 1)
25671#pragma GCC visibility push(default)
25672#define RUBY_EVENT_COVERAGE_LINE 0x010000
25673#define RUBY_EVENT_COVERAGE_BRANCH 0x020000
25674#pragma GCC visibility pop
25675#define PASS_PASSED_BLOCK_HANDLER_EC(ec) pass_passed_block_handler(ec)
25676#define PASS_PASSED_BLOCK_HANDLER() pass_passed_block_handler(GET_EC())
25677#define ruby_setjmp(env) RUBY_SETJMP(env)
25678#define ruby_longjmp(env,val) RUBY_LONGJMP((env),(val))
25679#define _ERRNO_H 1
25680#define _BITS_ERRNO_H 1
25681#define _ASM_GENERIC_ERRNO_H
25682#define _ASM_GENERIC_ERRNO_BASE_H
25683#define EPERM 1
25684#define ENOENT 2
25685#define ESRCH 3
25686#define EINTR 4
25687#define EIO 5
25688#define ENXIO 6
25689#define E2BIG 7
25690#define ENOEXEC 8
25691#define EBADF 9
25692#define ECHILD 10
25693#define EAGAIN 11
25694#define ENOMEM 12
25695#define EACCES 13
25696#define EFAULT 14
25697#define ENOTBLK 15
25698#define EBUSY 16
25699#define EEXIST 17
25700#define EXDEV 18
25701#define ENODEV 19
25702#define ENOTDIR 20
25703#define EISDIR 21
25704#define EINVAL 22
25705#define ENFILE 23
25706#define EMFILE 24
25707#define ENOTTY 25
25708#define ETXTBSY 26
25709#define EFBIG 27
25710#define ENOSPC 28
25711#define ESPIPE 29
25712#define EROFS 30
25713#define EMLINK 31
25714#define EPIPE 32
25715#define EDOM 33
25716#define ERANGE 34
25717#define EDEADLK 35
25718#define ENAMETOOLONG 36
25719#define ENOLCK 37
25720#define ENOSYS 38
25721#define ENOTEMPTY 39
25722#define ELOOP 40
25723#define EWOULDBLOCK EAGAIN
25724#define ENOMSG 42
25725#define EIDRM 43
25726#define ECHRNG 44
25727#define EL2NSYNC 45
25728#define EL3HLT 46
25729#define EL3RST 47
25730#define ELNRNG 48
25731#define EUNATCH 49
25732#define ENOCSI 50
25733#define EL2HLT 51
25734#define EBADE 52
25735#define EBADR 53
25736#define EXFULL 54
25737#define ENOANO 55
25738#define EBADRQC 56
25739#define EBADSLT 57
25740#define EDEADLOCK EDEADLK
25741#define EBFONT 59
25742#define ENOSTR 60
25743#define ENODATA 61
25744#define ETIME 62
25745#define ENOSR 63
25746#define ENONET 64
25747#define ENOPKG 65
25748#define EREMOTE 66
25749#define ENOLINK 67
25750#define EADV 68
25751#define ESRMNT 69
25752#define ECOMM 70
25753#define EPROTO 71
25754#define EMULTIHOP 72
25755#define EDOTDOT 73
25756#define EBADMSG 74
25757#define EOVERFLOW 75
25758#define ENOTUNIQ 76
25759#define EBADFD 77
25760#define EREMCHG 78
25761#define ELIBACC 79
25762#define ELIBBAD 80
25763#define ELIBSCN 81
25764#define ELIBMAX 82
25765#define ELIBEXEC 83
25766#define EILSEQ 84
25767#define ERESTART 85
25768#define ESTRPIPE 86
25769#define EUSERS 87
25770#define ENOTSOCK 88
25771#define EDESTADDRREQ 89
25772#define EMSGSIZE 90
25773#define EPROTOTYPE 91
25774#define ENOPROTOOPT 92
25775#define EPROTONOSUPPORT 93
25776#define ESOCKTNOSUPPORT 94
25777#define EOPNOTSUPP 95
25778#define EPFNOSUPPORT 96
25779#define EAFNOSUPPORT 97
25780#define EADDRINUSE 98
25781#define EADDRNOTAVAIL 99
25782#define ENETDOWN 100
25783#define ENETUNREACH 101
25784#define ENETRESET 102
25785#define ECONNABORTED 103
25786#define ECONNRESET 104
25787#define ENOBUFS 105
25788#define EISCONN 106
25789#define ENOTCONN 107
25790#define ESHUTDOWN 108
25791#define ETOOMANYREFS 109
25792#define ETIMEDOUT 110
25793#define ECONNREFUSED 111
25794#define EHOSTDOWN 112
25795#define EHOSTUNREACH 113
25796#define EALREADY 114
25797#define EINPROGRESS 115
25798#define ESTALE 116
25799#define EUCLEAN 117
25800#define ENOTNAM 118
25801#define ENAVAIL 119
25802#define EISNAM 120
25803#define EREMOTEIO 121
25804#define EDQUOT 122
25805#define ENOMEDIUM 123
25806#define EMEDIUMTYPE 124
25807#define ECANCELED 125
25808#define ENOKEY 126
25809#define EKEYEXPIRED 127
25810#define EKEYREVOKED 128
25811#define EKEYREJECTED 129
25812#define EOWNERDEAD 130
25813#define ENOTRECOVERABLE 131
25814#define ERFKILL 132
25815#define EHWPOISON 133
25816#define ENOTSUP EOPNOTSUPP
25817#define errno (*__errno_location ())
25818#define __error_t_defined 1
25819#define _SYS_PARAM_H 1
25820#define __need_NULL
25821#undef __need_ptrdiff_t
25822#undef __need_size_t
25823#undef __need_wchar_t
25824#undef NULL
25825#define NULL ((void *)0)
25826#undef __need_NULL
25827#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
25828#define __undef_ARG_MAX
25829#define _LINUX_PARAM_H
25830#define __ASM_GENERIC_PARAM_H
25831#define HZ 100
25832#define EXEC_PAGESIZE 4096
25833#define NOGROUP (-1)
25834#define MAXHOSTNAMELEN 64
25835#undef ARG_MAX
25836#undef __undef_ARG_MAX
25837#define MAXSYMLINKS 20
25838#define NOFILE 256
25839#define NCARGS 131072
25840#define NBBY CHAR_BIT
25841#define NGROUPS NGROUPS_MAX
25842#define CANBSIZ MAX_CANON
25843#define MAXPATHLEN PATH_MAX
25844#define NODEV ((dev_t) -1)
25845#define DEV_BSIZE 512
25846#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
25847#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
25848#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
25849#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
25850#define howmany(x,y) (((x) + ((y) - 1)) / (y))
25851#define roundup(x,y) (__builtin_constant_p (y) && powerof2 (y) ? (((x) + (y) - 1) & ~((y) - 1)) : ((((x) + ((y) - 1)) / (y)) * (y)))
25852#define powerof2(x) ((((x) - 1) & (x)) == 0)
25853#define MIN(a,b) (((a)<(b))?(a):(b))
25854#define MAX(a,b) (((a)>(b))?(a):(b))
25855#define SAVE_ROOT_JMPBUF(th,stmt) do if (true) { stmt; } else if (th) { } while (0)
25856#define EC_PUSH_TAG(ec) do { rb_execution_context_t * const _ec = (ec); struct rb_vm_tag _tag; _tag.state = TAG_NONE; _tag.tag = Qundef; _tag.prev = _ec->tag; _tag.lock_rec = rb_ec_vm_lock_rec(_ec);
25857#define EC_POP_TAG() _ec->tag = _tag.prev; } while (0)
25858#define EC_TMPPOP_TAG() _ec->tag = _tag.prev
25859#define EC_REPUSH_TAG() (void)(_ec->tag = &_tag)
25860#define VAR_FROM_MEMORY(var) (var)
25861#define VAR_INITIALIZED(var) ((void)&(var))
25862#define VAR_NOCLOBBERED(var) var
25863#define EC_EXEC_TAG() (ruby_setjmp(_tag.buf) ? rb_ec_tag_state(VAR_FROM_MEMORY(_ec)) : (EC_REPUSH_TAG(), 0))
25864#define EC_JUMP_TAG(ec,st) rb_ec_tag_jump(ec, st)
25865#define INTERNAL_EXCEPTION_P(exc) FIXNUM_P(exc)
25866#define CREF_FL_PUSHED_BY_EVAL IMEMO_FL_USER1
25867#define CREF_FL_OMOD_SHARED IMEMO_FL_USER2
25868#define CREF_FL_SINGLETON IMEMO_FL_USER3
25869#pragma GCC diagnostic push
25870#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
25871#pragma GCC diagnostic pop
25872#define rb_ec_raised_set(ec,f) ((ec)->raised_flag |= (f))
25873#define rb_ec_raised_reset(ec,f) ((ec)->raised_flag &= ~(f))
25874#define rb_ec_raised_p(ec,f) (((ec)->raised_flag & (f)) != 0)
25875#define rb_ec_raised_clear(ec) ((ec)->raised_flag = 0)
25876#define CharNext(p) rb_char_next(p)
25877#define RUBY_GC_H 1
25878#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("movq\t%%rsp, %0" : "=r" (*(p)))
25879#define RB_GC_SAVE_MACHINE_CONTEXT(th) do { FLUSH_REGISTER_WINDOWS; setjmp((th)->ec->machine.regs); SET_MACHINE_STACK_END(&(th)->ec->machine.stack_end); } while (0)
25880#define RUBY_MARK_FREE_DEBUG 0
25881#define RUBY_MARK_ENTER(msg)
25882#define RUBY_MARK_LEAVE(msg)
25883#define RUBY_FREE_ENTER(msg)
25884#define RUBY_FREE_LEAVE(msg)
25885#define RUBY_GC_INFO if(0)printf
25886#define RUBY_MARK_MOVABLE_UNLESS_NULL(ptr) do { VALUE markobj = (ptr); if (RTEST(markobj)) {rb_gc_mark_movable(markobj);} } while (0)
25887#define RUBY_MARK_UNLESS_NULL(ptr) do { VALUE markobj = (ptr); if (RTEST(markobj)) {rb_gc_mark(markobj);} } while (0)
25888#define RUBY_FREE_UNLESS_NULL(ptr) if(ptr){ruby_xfree(ptr);(ptr)=NULL;}
25889#define STACK_UPPER(x,a,b) (b)
25890#define STACK_GROW_DIR_DETECTION
25891#define STACK_DIR_UPPER(a,b) STACK_UPPER(0, (a), (b))
25892#define IS_STACK_DIR_UPPER() STACK_DIR_UPPER(1,0)
25893#pragma GCC visibility push(default)
25894#pragma GCC visibility pop
25895#define INTERNAL_COMPILE_H
25896#pragma GCC visibility push(default)
25897#pragma GCC visibility pop
25898#define INTERNAL_CONT_H
25899#define INTERNAL_ERROR_H
25900#define INTERNAL_STRING_H
25901#define RUBY_ENCODING_H 1
25902#define RUBY_INTERNAL_ENCODING_CODERANGE_H
25903#pragma GCC visibility push(default)
25904#define ENC_CODERANGE_MASK RUBY_ENC_CODERANGE_MASK
25905#define ENC_CODERANGE_UNKNOWN RUBY_ENC_CODERANGE_UNKNOWN
25906#define ENC_CODERANGE_7BIT RUBY_ENC_CODERANGE_7BIT
25907#define ENC_CODERANGE_VALID RUBY_ENC_CODERANGE_VALID
25908#define ENC_CODERANGE_BROKEN RUBY_ENC_CODERANGE_BROKEN
25909#define ENC_CODERANGE_CLEAN_P(cr) RB_ENC_CODERANGE_CLEAN_P(cr)
25910#define ENC_CODERANGE(obj) RB_ENC_CODERANGE(obj)
25911#define ENC_CODERANGE_ASCIIONLY(obj) RB_ENC_CODERANGE_ASCIIONLY(obj)
25912#define ENC_CODERANGE_SET(obj,cr) RB_ENC_CODERANGE_SET(obj,cr)
25913#define ENC_CODERANGE_CLEAR(obj) RB_ENC_CODERANGE_CLEAR(obj)
25914#define ENC_CODERANGE_AND(a,b) RB_ENC_CODERANGE_AND(a, b)
25915#define ENCODING_CODERANGE_SET(obj,encindex,cr) RB_ENCODING_CODERANGE_SET(obj, encindex, cr)
25916#define RB_ENC_CODERANGE RB_ENC_CODERANGE
25917#define RB_ENC_CODERANGE_AND RB_ENC_CODERANGE_AND
25918#define RB_ENC_CODERANGE_ASCIIONLY RB_ENC_CODERANGE_ASCIIONLY
25919#define RB_ENC_CODERANGE_CLEAN_P RB_ENC_CODERANGE_CLEAN_P
25920#define RB_ENC_CODERANGE_CLEAR RB_ENC_CODERANGE_CLEAR
25921#define RB_ENC_CODERANGE_SET RB_ENC_CODERANGE_SET
25922#pragma GCC visibility pop
25923#define RUBY_INTERNAL_ENCODING_CTYPE_H
25924#define ONIGMO_H
25925#define ONIGMO_VERSION_MAJOR 6
25926#define ONIGMO_VERSION_MINOR 1
25927#define ONIGMO_VERSION_TEENY 3
25928#define ONIG_EXTERN RUBY_EXTERN
25929#pragma GCC visibility push(default)
25930#define UChar OnigUChar
25931#define ONIG_INFINITE_DISTANCE ~((OnigDistance )0)
25932#define OnigCodePointMaskWidth 3
25933#define OnigCodePointMask ((1<<OnigCodePointMaskWidth)-1)
25934#define OnigCodePointCount(n) ((n)&OnigCodePointMask)
25935#define OnigCaseFoldFlags(n) ((n)&~OnigCodePointMask)
25936#define OnigSpecialIndexShift 3
25937#define OnigSpecialIndexWidth 10
25938#define ONIGENC_CASE_UPCASE (1<<13)
25939#define ONIGENC_CASE_DOWNCASE (1<<14)
25940#define ONIGENC_CASE_TITLECASE (1<<15)
25941#define ONIGENC_CASE_SPECIAL_OFFSET 3
25942#define ONIGENC_CASE_UP_SPECIAL (1<<16)
25943#define ONIGENC_CASE_DOWN_SPECIAL (1<<17)
25944#define ONIGENC_CASE_MODIFIED (1<<18)
25945#define ONIGENC_CASE_FOLD (1<<19)
25946#define ONIGENC_CASE_FOLD_TURKISH_AZERI (1<<20)
25947#define ONIGENC_CASE_FOLD_LITHUANIAN (1<<21)
25948#define ONIGENC_CASE_ASCII_ONLY (1<<22)
25949#define ONIGENC_CASE_IS_TITLECASE (1<<23)
25950#define INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR (1<<30)
25951#define ONIGENC_CASE_FOLD_MIN INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR
25952#define ONIGENC_CASE_FOLD_DEFAULT OnigDefaultCaseFoldFlag
25953#define ONIGENC_MAX_COMP_CASE_FOLD_CODE_LEN 3
25954#define ONIGENC_GET_CASE_FOLD_CODES_MAX_NUM 13
25955#define ONIGENC_CODE_RANGE_NUM(range) ((int )range[0])
25956#define ONIGENC_CODE_RANGE_FROM(range,i) range[((i)*2) + 1]
25957#define ONIGENC_CODE_RANGE_TO(range,i) range[((i)*2) + 2]
25958#define ONIG_ENCODING_ASCII (&OnigEncodingASCII)
25959#define ONIG_ENCODING_UNDEF ((OnigEncoding )0)
25960#define ONIGENC_CODE_TO_MBC_MAXLEN 7
25961#define ONIGENC_MBC_CASE_FOLD_MAXLEN 18
25962#define ONIGENC_CTYPE_NEWLINE 0
25963#define ONIGENC_CTYPE_ALPHA 1
25964#define ONIGENC_CTYPE_BLANK 2
25965#define ONIGENC_CTYPE_CNTRL 3
25966#define ONIGENC_CTYPE_DIGIT 4
25967#define ONIGENC_CTYPE_GRAPH 5
25968#define ONIGENC_CTYPE_LOWER 6
25969#define ONIGENC_CTYPE_PRINT 7
25970#define ONIGENC_CTYPE_PUNCT 8
25971#define ONIGENC_CTYPE_SPACE 9
25972#define ONIGENC_CTYPE_UPPER 10
25973#define ONIGENC_CTYPE_XDIGIT 11
25974#define ONIGENC_CTYPE_WORD 12
25975#define ONIGENC_CTYPE_ALNUM 13
25976#define ONIGENC_CTYPE_ASCII 14
25977#define ONIGENC_MAX_STD_CTYPE ONIGENC_CTYPE_ASCII
25978#define ONIGENC_FLAG_NONE 0U
25979#define ONIGENC_FLAG_UNICODE 1U
25980#define onig_enc_len(enc,p,e) ONIGENC_MBC_ENC_LEN(enc, p, e)
25981#define ONIGENC_IS_UNDEF(enc) ((enc) == ONIG_ENCODING_UNDEF)
25982#define ONIGENC_IS_SINGLEBYTE(enc) (ONIGENC_MBC_MAXLEN(enc) == 1)
25983#define ONIGENC_IS_MBC_HEAD(enc,p,e) (ONIGENC_MBC_ENC_LEN(enc,p,e) != 1)
25984#define ONIGENC_IS_MBC_ASCII(p) (*(p) < 128)
25985#define ONIGENC_IS_CODE_ASCII(code) ((code) < 128)
25986#define ONIGENC_IS_MBC_WORD(enc,s,end) ONIGENC_IS_CODE_WORD(enc,ONIGENC_MBC_TO_CODE(enc,s,end))
25987#define ONIGENC_IS_MBC_ASCII_WORD(enc,s,end) onigenc_ascii_is_code_ctype( ONIGENC_MBC_TO_CODE(enc,s,end),ONIGENC_CTYPE_WORD,enc)
25988#define ONIGENC_IS_UNICODE(enc) ((enc)->flags & ONIGENC_FLAG_UNICODE)
25989#define ONIGENC_NAME(enc) ((enc)->name)
25990#define ONIGENC_MBC_CASE_FOLD(enc,flag,pp,end,buf) (enc)->mbc_case_fold(flag,(const OnigUChar** )pp,end,buf,enc)
25991#define ONIGENC_IS_ALLOWED_REVERSE_MATCH(enc,s,end) (enc)->is_allowed_reverse_match(s,end,enc)
25992#define ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc,start,s,end) (enc)->left_adjust_char_head(start, s, end, enc)
25993#define ONIGENC_APPLY_ALL_CASE_FOLD(enc,case_fold_flag,f,arg) (enc)->apply_all_case_fold(case_fold_flag,f,arg,enc)
25994#define ONIGENC_GET_CASE_FOLD_CODES_BY_STR(enc,case_fold_flag,p,end,acs) (enc)->get_case_fold_codes_by_str(case_fold_flag,p,end,acs,enc)
25995#define ONIGENC_STEP_BACK(enc,start,s,end,n) onigenc_step_back((enc),(start),(s),(end),(n))
25996#define ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(n) (n)
25997#define ONIGENC_MBCLEN_CHARFOUND_P(r) (0 < (r))
25998#define ONIGENC_MBCLEN_CHARFOUND_LEN(r) (r)
25999#define ONIGENC_CONSTRUCT_MBCLEN_INVALID() (-1)
26000#define ONIGENC_MBCLEN_INVALID_P(r) ((r) == -1)
26001#define ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(n) (-1-(n))
26002#define ONIGENC_MBCLEN_NEEDMORE_P(r) ((r) < -1)
26003#define ONIGENC_MBCLEN_NEEDMORE_LEN(r) (-1-(r))
26004#define ONIGENC_PRECISE_MBC_ENC_LEN(enc,p,e) (enc)->precise_mbc_enc_len(p,e,enc)
26005#define ONIGENC_MBC_ENC_LEN(enc,p,e) onigenc_mbclen_approximate(p,e,enc)
26006#define ONIGENC_MBC_MAXLEN(enc) ((enc)->max_enc_len)
26007#define ONIGENC_MBC_MAXLEN_DIST(enc) ONIGENC_MBC_MAXLEN(enc)
26008#define ONIGENC_MBC_MINLEN(enc) ((enc)->min_enc_len)
26009#define ONIGENC_IS_MBC_NEWLINE(enc,p,end) (enc)->is_mbc_newline((p),(end),enc)
26010#define ONIGENC_MBC_TO_CODE(enc,p,end) (enc)->mbc_to_code((p),(end),enc)
26011#define ONIGENC_CODE_TO_MBCLEN(enc,code) (enc)->code_to_mbclen(code,enc)
26012#define ONIGENC_CODE_TO_MBC(enc,code,buf) (enc)->code_to_mbc(code,buf,enc)
26013#define ONIGENC_PROPERTY_NAME_TO_CTYPE(enc,p,end) (enc)->property_name_to_ctype(enc,p,end)
26014#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype) (enc)->is_code_ctype(code,ctype,enc)
26015#define ONIGENC_IS_CODE_NEWLINE(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_NEWLINE)
26016#define ONIGENC_IS_CODE_GRAPH(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_GRAPH)
26017#define ONIGENC_IS_CODE_PRINT(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_PRINT)
26018#define ONIGENC_IS_CODE_ALNUM(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_ALNUM)
26019#define ONIGENC_IS_CODE_ALPHA(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_ALPHA)
26020#define ONIGENC_IS_CODE_LOWER(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_LOWER)
26021#define ONIGENC_IS_CODE_UPPER(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_UPPER)
26022#define ONIGENC_IS_CODE_CNTRL(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_CNTRL)
26023#define ONIGENC_IS_CODE_PUNCT(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_PUNCT)
26024#define ONIGENC_IS_CODE_SPACE(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_SPACE)
26025#define ONIGENC_IS_CODE_BLANK(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_BLANK)
26026#define ONIGENC_IS_CODE_DIGIT(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_DIGIT)
26027#define ONIGENC_IS_CODE_XDIGIT(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_XDIGIT)
26028#define ONIGENC_IS_CODE_WORD(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD)
26029#define ONIGENC_GET_CTYPE_CODE_RANGE(enc,ctype,sbout,ranges) (enc)->get_ctype_code_range(ctype,sbout,ranges,enc)
26030#define ONIG_NREGION 4
26031#define ONIG_MAX_CAPTURE_GROUP_NUM 32767
26032#define ONIG_MAX_BACKREF_NUM 1000
26033#define ONIG_MAX_REPEAT_NUM 100000
26034#define ONIG_MAX_MULTI_BYTE_RANGES_NUM 10000
26035#define ONIG_MAX_ERROR_MESSAGE_LEN 90
26036#define ONIG_OPTION_DEFAULT ONIG_OPTION_NONE
26037#define ONIG_OPTION_NONE 0U
26038#define ONIG_OPTION_IGNORECASE 1U
26039#define ONIG_OPTION_EXTEND (ONIG_OPTION_IGNORECASE << 1)
26040#define ONIG_OPTION_MULTILINE (ONIG_OPTION_EXTEND << 1)
26041#define ONIG_OPTION_DOTALL ONIG_OPTION_MULTILINE
26042#define ONIG_OPTION_SINGLELINE (ONIG_OPTION_MULTILINE << 1)
26043#define ONIG_OPTION_FIND_LONGEST (ONIG_OPTION_SINGLELINE << 1)
26044#define ONIG_OPTION_FIND_NOT_EMPTY (ONIG_OPTION_FIND_LONGEST << 1)
26045#define ONIG_OPTION_NEGATE_SINGLELINE (ONIG_OPTION_FIND_NOT_EMPTY << 1)
26046#define ONIG_OPTION_DONT_CAPTURE_GROUP (ONIG_OPTION_NEGATE_SINGLELINE << 1)
26047#define ONIG_OPTION_CAPTURE_GROUP (ONIG_OPTION_DONT_CAPTURE_GROUP << 1)
26048#define ONIG_OPTION_NOTBOL (ONIG_OPTION_CAPTURE_GROUP << 1)
26049#define ONIG_OPTION_NOTEOL (ONIG_OPTION_NOTBOL << 1)
26050#define ONIG_OPTION_NOTBOS (ONIG_OPTION_NOTEOL << 1)
26051#define ONIG_OPTION_NOTEOS (ONIG_OPTION_NOTBOS << 1)
26052#define ONIG_OPTION_ASCII_RANGE (ONIG_OPTION_NOTEOS << 1)
26053#define ONIG_OPTION_POSIX_BRACKET_ALL_RANGE (ONIG_OPTION_ASCII_RANGE << 1)
26054#define ONIG_OPTION_WORD_BOUND_ALL_RANGE (ONIG_OPTION_POSIX_BRACKET_ALL_RANGE << 1)
26055#define ONIG_OPTION_NEWLINE_CRLF (ONIG_OPTION_WORD_BOUND_ALL_RANGE << 1)
26056#define ONIG_OPTION_MAXBIT ONIG_OPTION_NEWLINE_CRLF
26057#define ONIG_OPTION_ON(options,regopt) ((options) |= (regopt))
26058#define ONIG_OPTION_OFF(options,regopt) ((options) &= ~(regopt))
26059#define ONIG_IS_OPTION_ON(options,option) ((options) & (option))
26060#define ONIG_SYNTAX_ASIS (&OnigSyntaxASIS)
26061#define ONIG_SYNTAX_POSIX_BASIC (&OnigSyntaxPosixBasic)
26062#define ONIG_SYNTAX_POSIX_EXTENDED (&OnigSyntaxPosixExtended)
26063#define ONIG_SYNTAX_EMACS (&OnigSyntaxEmacs)
26064#define ONIG_SYNTAX_GREP (&OnigSyntaxGrep)
26065#define ONIG_SYNTAX_GNU_REGEX (&OnigSyntaxGnuRegex)
26066#define ONIG_SYNTAX_JAVA (&OnigSyntaxJava)
26067#define ONIG_SYNTAX_PERL58 (&OnigSyntaxPerl58)
26068#define ONIG_SYNTAX_PERL58_NG (&OnigSyntaxPerl58_NG)
26069#define ONIG_SYNTAX_PERL (&OnigSyntaxPerl)
26070#define ONIG_SYNTAX_RUBY (&OnigSyntaxRuby)
26071#define ONIG_SYNTAX_PYTHON (&OnigSyntaxPython)
26072#define ONIG_SYNTAX_DEFAULT OnigDefaultSyntax
26073#define ONIG_SYN_OP_VARIABLE_META_CHARACTERS (1U<<0)
26074#define ONIG_SYN_OP_DOT_ANYCHAR (1U<<1)
26075#define ONIG_SYN_OP_ASTERISK_ZERO_INF (1U<<2)
26076#define ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF (1U<<3)
26077#define ONIG_SYN_OP_PLUS_ONE_INF (1U<<4)
26078#define ONIG_SYN_OP_ESC_PLUS_ONE_INF (1U<<5)
26079#define ONIG_SYN_OP_QMARK_ZERO_ONE (1U<<6)
26080#define ONIG_SYN_OP_ESC_QMARK_ZERO_ONE (1U<<7)
26081#define ONIG_SYN_OP_BRACE_INTERVAL (1U<<8)
26082#define ONIG_SYN_OP_ESC_BRACE_INTERVAL (1U<<9)
26083#define ONIG_SYN_OP_VBAR_ALT (1U<<10)
26084#define ONIG_SYN_OP_ESC_VBAR_ALT (1U<<11)
26085#define ONIG_SYN_OP_LPAREN_SUBEXP (1U<<12)
26086#define ONIG_SYN_OP_ESC_LPAREN_SUBEXP (1U<<13)
26087#define ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR (1U<<14)
26088#define ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR (1U<<15)
26089#define ONIG_SYN_OP_DECIMAL_BACKREF (1U<<16)
26090#define ONIG_SYN_OP_BRACKET_CC (1U<<17)
26091#define ONIG_SYN_OP_ESC_W_WORD (1U<<18)
26092#define ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END (1U<<19)
26093#define ONIG_SYN_OP_ESC_B_WORD_BOUND (1U<<20)
26094#define ONIG_SYN_OP_ESC_S_WHITE_SPACE (1U<<21)
26095#define ONIG_SYN_OP_ESC_D_DIGIT (1U<<22)
26096#define ONIG_SYN_OP_LINE_ANCHOR (1U<<23)
26097#define ONIG_SYN_OP_POSIX_BRACKET (1U<<24)
26098#define ONIG_SYN_OP_QMARK_NON_GREEDY (1U<<25)
26099#define ONIG_SYN_OP_ESC_CONTROL_CHARS (1U<<26)
26100#define ONIG_SYN_OP_ESC_C_CONTROL (1U<<27)
26101#define ONIG_SYN_OP_ESC_OCTAL3 (1U<<28)
26102#define ONIG_SYN_OP_ESC_X_HEX2 (1U<<29)
26103#define ONIG_SYN_OP_ESC_X_BRACE_HEX8 (1U<<30)
26104#define ONIG_SYN_OP_ESC_O_BRACE_OCTAL (1U<<31)
26105#define ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE (1U<<0)
26106#define ONIG_SYN_OP2_QMARK_GROUP_EFFECT (1U<<1)
26107#define ONIG_SYN_OP2_OPTION_PERL (1U<<2)
26108#define ONIG_SYN_OP2_OPTION_RUBY (1U<<3)
26109#define ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT (1U<<4)
26110#define ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL (1U<<5)
26111#define ONIG_SYN_OP2_CCLASS_SET_OP (1U<<6)
26112#define ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP (1U<<7)
26113#define ONIG_SYN_OP2_ESC_K_NAMED_BACKREF (1U<<8)
26114#define ONIG_SYN_OP2_ESC_G_SUBEXP_CALL (1U<<9)
26115#define ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY (1U<<10)
26116#define ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL (1U<<11)
26117#define ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META (1U<<12)
26118#define ONIG_SYN_OP2_ESC_V_VTAB (1U<<13)
26119#define ONIG_SYN_OP2_ESC_U_HEX4 (1U<<14)
26120#define ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR (1U<<15)
26121#define ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY (1U<<16)
26122#define ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT (1U<<17)
26123#define ONIG_SYN_OP2_ESC_H_XDIGIT (1U<<19)
26124#define ONIG_SYN_OP2_INEFFECTIVE_ESCAPE (1U<<20)
26125#define ONIG_SYN_OP2_ESC_CAPITAL_R_LINEBREAK (1U<<21)
26126#define ONIG_SYN_OP2_ESC_CAPITAL_X_EXTENDED_GRAPHEME_CLUSTER (1U<<22)
26127#define ONIG_SYN_OP2_ESC_V_VERTICAL_WHITESPACE (1U<<23)
26128#define ONIG_SYN_OP2_ESC_H_HORIZONTAL_WHITESPACE (1U<<24)
26129#define ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP (1U<<25)
26130#define ONIG_SYN_OP2_ESC_G_BRACE_BACKREF (1U<<26)
26131#define ONIG_SYN_OP2_QMARK_SUBEXP_CALL (1U<<27)
26132#define ONIG_SYN_OP2_QMARK_VBAR_BRANCH_RESET (1U<<28)
26133#define ONIG_SYN_OP2_QMARK_LPAREN_CONDITION (1U<<29)
26134#define ONIG_SYN_OP2_QMARK_CAPITAL_P_NAMED_GROUP (1U<<30)
26135#define ONIG_SYN_OP2_QMARK_TILDE_ABSENT (1U<<31)
26136#define ONIG_SYN_CONTEXT_INDEP_ANCHORS (1U<<31)
26137#define ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS (1U<<0)
26138#define ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS (1U<<1)
26139#define ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP (1U<<2)
26140#define ONIG_SYN_ALLOW_INVALID_INTERVAL (1U<<3)
26141#define ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV (1U<<4)
26142#define ONIG_SYN_STRICT_CHECK_BACKREF (1U<<5)
26143#define ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND (1U<<6)
26144#define ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP (1U<<7)
26145#define ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME (1U<<8)
26146#define ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY (1U<<9)
26147#define ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME_CALL (1U<<10)
26148#define ONIG_SYN_USE_LEFT_MOST_NAMED_GROUP (1U<<11)
26149#define ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC (1U<<20)
26150#define ONIG_SYN_BACKSLASH_ESCAPE_IN_CC (1U<<21)
26151#define ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC (1U<<22)
26152#define ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC (1U<<23)
26153#define ONIG_SYN_WARN_CC_OP_NOT_ESCAPED (1U<<24)
26154#define ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT (1U<<25)
26155#define ONIG_SYN_WARN_CC_DUP (1U<<26)
26156#define ONIG_META_CHAR_ESCAPE 0
26157#define ONIG_META_CHAR_ANYCHAR 1
26158#define ONIG_META_CHAR_ANYTIME 2
26159#define ONIG_META_CHAR_ZERO_OR_ONE_TIME 3
26160#define ONIG_META_CHAR_ONE_OR_MORE_TIME 4
26161#define ONIG_META_CHAR_ANYCHAR_ANYTIME 5
26162#define ONIG_INEFFECTIVE_META_CHAR 0
26163#define ONIG_IS_PATTERN_ERROR(ecode) ((ecode) <= -100 && (ecode) > -1000)
26164#define ONIG_NORMAL 0
26165#define ONIG_MISMATCH -1
26166#define ONIG_NO_SUPPORT_CONFIG -2
26167#define ONIGERR_MEMORY -5
26168#define ONIGERR_TYPE_BUG -6
26169#define ONIGERR_PARSER_BUG -11
26170#define ONIGERR_STACK_BUG -12
26171#define ONIGERR_UNDEFINED_BYTECODE -13
26172#define ONIGERR_UNEXPECTED_BYTECODE -14
26173#define ONIGERR_MATCH_STACK_LIMIT_OVER -15
26174#define ONIGERR_PARSE_DEPTH_LIMIT_OVER -16
26175#define ONIGERR_DEFAULT_ENCODING_IS_NOT_SET -21
26176#define ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR -22
26177#define ONIGERR_INVALID_ARGUMENT -30
26178#define ONIGERR_END_PATTERN_AT_LEFT_BRACE -100
26179#define ONIGERR_END_PATTERN_AT_LEFT_BRACKET -101
26180#define ONIGERR_EMPTY_CHAR_CLASS -102
26181#define ONIGERR_PREMATURE_END_OF_CHAR_CLASS -103
26182#define ONIGERR_END_PATTERN_AT_ESCAPE -104
26183#define ONIGERR_END_PATTERN_AT_META -105
26184#define ONIGERR_END_PATTERN_AT_CONTROL -106
26185#define ONIGERR_META_CODE_SYNTAX -108
26186#define ONIGERR_CONTROL_CODE_SYNTAX -109
26187#define ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE -110
26188#define ONIGERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE -111
26189#define ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS -112
26190#define ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED -113
26191#define ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID -114
26192#define ONIGERR_NESTED_REPEAT_OPERATOR -115
26193#define ONIGERR_UNMATCHED_CLOSE_PARENTHESIS -116
26194#define ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS -117
26195#define ONIGERR_END_PATTERN_IN_GROUP -118
26196#define ONIGERR_UNDEFINED_GROUP_OPTION -119
26197#define ONIGERR_INVALID_POSIX_BRACKET_TYPE -121
26198#define ONIGERR_INVALID_LOOK_BEHIND_PATTERN -122
26199#define ONIGERR_INVALID_REPEAT_RANGE_PATTERN -123
26200#define ONIGERR_INVALID_CONDITION_PATTERN -124
26201#define ONIGERR_TOO_BIG_NUMBER -200
26202#define ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE -201
26203#define ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE -202
26204#define ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS -203
26205#define ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE -204
26206#define ONIGERR_TOO_MANY_MULTI_BYTE_RANGES -205
26207#define ONIGERR_TOO_SHORT_MULTI_BYTE_STRING -206
26208#define ONIGERR_TOO_BIG_BACKREF_NUMBER -207
26209#define ONIGERR_INVALID_BACKREF -208
26210#define ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED -209
26211#define ONIGERR_TOO_MANY_CAPTURE_GROUPS -210
26212#define ONIGERR_TOO_SHORT_DIGITS -211
26213#define ONIGERR_TOO_LONG_WIDE_CHAR_VALUE -212
26214#define ONIGERR_EMPTY_GROUP_NAME -214
26215#define ONIGERR_INVALID_GROUP_NAME -215
26216#define ONIGERR_INVALID_CHAR_IN_GROUP_NAME -216
26217#define ONIGERR_UNDEFINED_NAME_REFERENCE -217
26218#define ONIGERR_UNDEFINED_GROUP_REFERENCE -218
26219#define ONIGERR_MULTIPLEX_DEFINED_NAME -219
26220#define ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL -220
26221#define ONIGERR_NEVER_ENDING_RECURSION -221
26222#define ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY -222
26223#define ONIGERR_INVALID_CHAR_PROPERTY_NAME -223
26224#define ONIGERR_INVALID_CODE_POINT_VALUE -400
26225#define ONIGERR_INVALID_WIDE_CHAR_VALUE -400
26226#define ONIGERR_TOO_BIG_WIDE_CHAR_VALUE -401
26227#define ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION -402
26228#define ONIGERR_INVALID_COMBINATION_OF_OPTIONS -403
26229#define ONIG_MAX_CAPTURE_HISTORY_GROUP 31
26230#define ONIG_IS_CAPTURE_HISTORY_GROUP(r,i) ((i) <= ONIG_MAX_CAPTURE_HISTORY_GROUP && (r)->list && (r)->list[i])
26231#define ONIG_TRAVERSE_CALLBACK_AT_FIRST 1
26232#define ONIG_TRAVERSE_CALLBACK_AT_LAST 2
26233#define ONIG_TRAVERSE_CALLBACK_AT_BOTH ( ONIG_TRAVERSE_CALLBACK_AT_FIRST | ONIG_TRAVERSE_CALLBACK_AT_LAST )
26234#define ONIG_REGION_NOTPOS -1
26235#define ONIG_NULL_WARN onig_null_warn
26236#define ONIG_CHAR_TABLE_SIZE 256
26237#pragma GCC visibility pop
26238#define RUBY_INTERNAL_ENCODING_ENCODING_H
26239#define ONIGURUMA_H
26240#define ONIGURUMA
26241#define ONIGURUMA_VERSION_MAJOR ONIGMO_VERSION_MAJOR
26242#define ONIGURUMA_VERSION_MINOR ONIGMO_VERSION_MINOR
26243#define ONIGURUMA_VERSION_TEENY ONIGMO_VERSION_TEENY
26244#pragma GCC visibility push(default)
26245#define ENCODING_INLINE_MAX RUBY_ENCODING_INLINE_MAX
26246#define ENCODING_SHIFT RUBY_ENCODING_SHIFT
26247#define ENCODING_MASK RUBY_ENCODING_MASK
26248#define ENCODING_SET_INLINED(obj,i) RB_ENCODING_SET_INLINED(obj,i)
26249#define ENCODING_SET(obj,i) RB_ENCODING_SET(obj,i)
26250#define ENCODING_GET_INLINED(obj) RB_ENCODING_GET_INLINED(obj)
26251#define ENCODING_GET(obj) RB_ENCODING_GET(obj)
26252#define ENCODING_IS_ASCII8BIT(obj) RB_ENCODING_IS_ASCII8BIT(obj)
26253#define ENCODING_MAXNAMELEN RUBY_ENCODING_MAXNAMELEN
26254#define MBCLEN_CHARFOUND_P(ret) ONIGENC_MBCLEN_CHARFOUND_P(ret)
26255#define MBCLEN_CHARFOUND_LEN(ret) ONIGENC_MBCLEN_CHARFOUND_LEN(ret)
26256#define MBCLEN_INVALID_P(ret) ONIGENC_MBCLEN_INVALID_P(ret)
26257#define MBCLEN_NEEDMORE_P(ret) ONIGENC_MBCLEN_NEEDMORE_P(ret)
26258#define MBCLEN_NEEDMORE_LEN(ret) ONIGENC_MBCLEN_NEEDMORE_LEN(ret)
26259#pragma GCC visibility pop
26260#define RB_ENCODING_GET RB_ENCODING_GET
26261#define RB_ENCODING_GET_INLINED RB_ENCODING_GET_INLINED
26262#define RB_ENCODING_IS_ASCII8BIT RB_ENCODING_IS_ASCII8BIT
26263#define RB_ENCODING_SET RB_ENCODING_SET
26264#define RB_ENCODING_SET_INLINED RB_ENCODING_SET_INLINED
26265#define rb_enc_asciicompat rb_enc_asciicompat
26266#define rb_enc_code_to_mbclen rb_enc_code_to_mbclen
26267#define rb_enc_codepoint rb_enc_codepoint
26268#define rb_enc_left_char_head rb_enc_left_char_head
26269#define rb_enc_mbc_to_codepoint rb_enc_mbc_to_codepoint
26270#define rb_enc_mbcput rb_enc_mbcput
26271#define rb_enc_mbmaxlen rb_enc_mbmaxlen
26272#define rb_enc_mbminlen rb_enc_mbminlen
26273#define rb_enc_name rb_enc_name
26274#define rb_enc_prev_char rb_enc_prev_char
26275#define rb_enc_right_char_head rb_enc_right_char_head
26276#define rb_enc_step_back rb_enc_step_back
26277#define rb_enc_str_asciicompat_p rb_enc_str_asciicompat_p
26278#pragma GCC visibility push(default)
26279#pragma GCC visibility pop
26280#define rb_enc_is_newline rb_enc_is_newline
26281#define rb_enc_isalnum rb_enc_isalnum
26282#define rb_enc_isalpha rb_enc_isalpha
26283#define rb_enc_isascii rb_enc_isascii
26284#define rb_enc_isctype rb_enc_isctype
26285#define rb_enc_isdigit rb_enc_isdigit
26286#define rb_enc_islower rb_enc_islower
26287#define rb_enc_isprint rb_enc_isprint
26288#define rb_enc_ispunct rb_enc_ispunct
26289#define rb_enc_isspace rb_enc_isspace
26290#define rb_enc_isupper rb_enc_isupper
26291#define RUBY_INTERNAL_ENCODING_PATHNAME_H
26292#pragma GCC visibility push(default)
26293#pragma GCC visibility pop
26294#define RUBY_INTERNAL_ENCODING_RE_H
26295#pragma GCC visibility push(default)
26296#pragma GCC visibility pop
26297#define RUBY_INTERNAL_ENCODING_SPRINTF_H
26298#pragma GCC visibility push(default)
26299#pragma GCC visibility pop
26300#define RUBY_INTERNAL_ENCODING_STRING_H
26301#pragma GCC visibility push(default)
26302#define rb_enc_str_new(str,len,enc) ((RBIMPL_CONSTANT_P(str) && RBIMPL_CONSTANT_P(len) ? rb_enc_str_new_static: rb_enc_str_new) ((str), (len), (enc)))
26303#define rb_enc_str_new_cstr(str,enc) ((RBIMPL_CONSTANT_P(str) ? rbimpl_enc_str_new_cstr : rb_enc_str_new_cstr) ((str), (enc)))
26304#pragma GCC visibility pop
26305#define RUBY_INTERNAL_ENCODING_SYMBOL_H
26306#pragma GCC visibility push(default)
26307#pragma GCC visibility pop
26308#define RUBY_INTERNAL_ENCODING_TRANSCODE_H
26309#pragma GCC visibility push(default)
26310#define ECONV_ERROR_HANDLER_MASK RUBY_ECONV_ERROR_HANDLER_MASK
26311#define ECONV_INVALID_MASK RUBY_ECONV_INVALID_MASK
26312#define ECONV_INVALID_REPLACE RUBY_ECONV_INVALID_REPLACE
26313#define ECONV_UNDEF_MASK RUBY_ECONV_UNDEF_MASK
26314#define ECONV_UNDEF_REPLACE RUBY_ECONV_UNDEF_REPLACE
26315#define ECONV_UNDEF_HEX_CHARREF RUBY_ECONV_UNDEF_HEX_CHARREF
26316#define ECONV_DECORATOR_MASK RUBY_ECONV_DECORATOR_MASK
26317#define ECONV_NEWLINE_DECORATOR_MASK RUBY_ECONV_NEWLINE_DECORATOR_MASK
26318#define ECONV_NEWLINE_DECORATOR_READ_MASK RUBY_ECONV_NEWLINE_DECORATOR_READ_MASK
26319#define ECONV_NEWLINE_DECORATOR_WRITE_MASK RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK
26320#define ECONV_UNIVERSAL_NEWLINE_DECORATOR RUBY_ECONV_UNIVERSAL_NEWLINE_DECORATOR
26321#define ECONV_CRLF_NEWLINE_DECORATOR RUBY_ECONV_CRLF_NEWLINE_DECORATOR
26322#define ECONV_CR_NEWLINE_DECORATOR RUBY_ECONV_CR_NEWLINE_DECORATOR
26323#define ECONV_XML_TEXT_DECORATOR RUBY_ECONV_XML_TEXT_DECORATOR
26324#define ECONV_XML_ATTR_CONTENT_DECORATOR RUBY_ECONV_XML_ATTR_CONTENT_DECORATOR
26325#define ECONV_STATEFUL_DECORATOR_MASK RUBY_ECONV_STATEFUL_DECORATOR_MASK
26326#define ECONV_XML_ATTR_QUOTE_DECORATOR RUBY_ECONV_XML_ATTR_QUOTE_DECORATOR
26327#define ECONV_DEFAULT_NEWLINE_DECORATOR RUBY_ECONV_DEFAULT_NEWLINE_DECORATOR
26328#define ECONV_PARTIAL_INPUT RUBY_ECONV_PARTIAL_INPUT
26329#define ECONV_AFTER_OUTPUT RUBY_ECONV_AFTER_OUTPUT
26330#pragma GCC visibility pop
26331#define STR_NOEMBED FL_USER1
26332#define STR_SHARED FL_USER2
26333#undef rb_fstring_cstr
26334#pragma GCC visibility push(default)
26335#pragma GCC visibility pop
26336#pragma GCC visibility push(default)
26337#pragma GCC visibility pop
26338#define rb_fstring_lit(str) rb_fstring_new((str), rb_strlen_lit(str))
26339#define rb_fstring_literal(str) rb_fstring_lit(str)
26340#define rb_fstring_enc_lit(str,enc) rb_fstring_enc_new((str), rb_strlen_lit(str), (enc))
26341#define rb_fstring_enc_literal(str,enc) rb_fstring_enc_lit(str, enc)
26342#define rb_fstring_cstr(str) (__builtin_constant_p(str) ? rb_fstring_new((str), (long)strlen(str)) : (rb_fstring_cstr)(str))
26343#undef Check_Type
26344#define rb_raise_static(e,m) rb_raise_cstr_i((e), rb_str_new_static((m), rb_strlen_lit(m)))
26345#define rb_sys_fail_path(path) rb_sys_fail_path_in(RUBY_FUNCTION_NAME_STRING, path)
26346#define rb_syserr_fail_path(err,path) rb_syserr_fail_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path))
26347#define rb_syserr_new_path(err,path) rb_syserr_new_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path))
26348#define rb_warn_deprecated_to_remove_at(removal,...) rb_warn_deprecated_to_remove(#removal, __VA_ARGS__)
26349#define RUBY_VERSION_SINCE(major,minor) 0
26350#define RUBY_VERSION_BEFORE(major,minor) 0
26351#define RBIMPL_TODO0(x)
26352#define RBIMPL_TODO(message) RBIMPL_TODO0("TODO: " message)
26353#define rb_typeddata_is_instance_of rb_typeddata_is_instance_of_inline
26354#pragma GCC visibility push(default)
26355#pragma GCC visibility pop
26356#define INTERNAL_EVAL_H
26357#define id_signo ruby_static_id_signo
26358#define id_status ruby_static_id_status
26359#define INTERNAL_INITS_H
26360#define INTERNAL_OBJECT_H
26361#define INTERNAL_CLASS_H
26362#define RUBY_ID_TABLE_H 1
26363#define RCLASS_EXT(c) ((rb_classext_t *)((char *)(c) + sizeof(struct RClass)))
26364#define RCLASS_IV_TBL(c) (RCLASS_EXT(c)->iv_tbl)
26365#define RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl)
26366#define RCLASS_M_TBL(c) (RCLASS_EXT(c)->m_tbl)
26367#define RCLASS_CALLABLE_M_TBL(c) (RCLASS_EXT(c)->callable_m_tbl)
26368#define RCLASS_CC_TBL(c) (RCLASS_EXT(c)->cc_tbl)
26369#define RCLASS_CVC_TBL(c) (RCLASS_EXT(c)->cvc_tbl)
26370#define RCLASS_IV_INDEX_TBL(c) (RCLASS_EXT(c)->iv_index_tbl)
26371#define RCLASS_ORIGIN(c) (RCLASS_EXT(c)->origin_)
26372#define RCLASS_REFINED_CLASS(c) (RCLASS_EXT(c)->refined_class)
26373#define RCLASS_SERIAL(c) (RCLASS(c)->class_serial)
26374#define RCLASS_INCLUDER(c) (RCLASS_EXT(c)->includer)
26375#define RCLASS_SUBCLASS_ENTRY(c) (RCLASS_EXT(c)->subclass_entry)
26376#define RCLASS_MODULE_SUBCLASS_ENTRY(c) (RCLASS_EXT(c)->module_subclass_entry)
26377#define RCLASS_ALLOCATOR(c) (RCLASS_EXT(c)->allocator)
26378#define RCLASS_SUBCLASSES(c) (RCLASS_EXT(c)->subclasses)
26379#define RCLASS_SUPERCLASS_DEPTH(c) (RCLASS_EXT(c)->superclass_depth)
26380#define RCLASS_SUPERCLASSES(c) (RCLASS_EXT(c)->superclasses)
26381#define RICLASS_IS_ORIGIN FL_USER0
26382#define RCLASS_CLONED FL_USER1
26383#define RCLASS_SUPERCLASSES_INCLUDE_SELF FL_USER2
26384#define RICLASS_ORIGIN_SHARED_MTBL FL_USER3
26385#pragma GCC visibility push(default)
26386#pragma GCC visibility pop
26387#pragma GCC diagnostic push
26388#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
26389#pragma GCC diagnostic pop
26390#pragma GCC diagnostic push
26391#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
26392#pragma GCC diagnostic pop
26393#pragma GCC diagnostic push
26394#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
26395#pragma GCC diagnostic pop
26396#pragma GCC visibility push(default)
26397#pragma GCC visibility pop
26398#pragma GCC visibility push(default)
26399#pragma GCC visibility pop
26400#define ROBJECT_IV_INDEX_TBL ROBJECT_IV_INDEX_TBL_inline
26401#define INTERNAL_PARSE_H
26402#pragma GCC visibility push(default)
26403#pragma GCC visibility pop
26404#define INTERNAL_PROC_H
26405#pragma GCC visibility push(default)
26406#pragma GCC visibility pop
26407#define INTERNAL_RE_H
26408#pragma GCC visibility push(default)
26409#pragma GCC visibility pop
26410#define INTERNAL_SYMBOL_H
26411#undef rb_sym_intern_ascii_cstr
26412#define rb_sym_intern_ascii_cstr(ptr) (__builtin_constant_p(ptr) ? rb_sym_intern_ascii((ptr), (long)strlen(ptr)) : rb_sym_intern_ascii_cstr(ptr))
26413#define INTERNAL_THREAD_H
26414#define COVERAGE_INDEX_LINES 0
26415#define COVERAGE_INDEX_BRANCHES 1
26416#define COVERAGE_TARGET_LINES 1
26417#define COVERAGE_TARGET_BRANCHES 2
26418#define COVERAGE_TARGET_METHODS 4
26419#define COVERAGE_TARGET_ONESHOT_LINES 8
26420#pragma GCC visibility push(default)
26421#pragma GCC visibility pop
26422#pragma GCC visibility push(default)
26423#pragma GCC visibility pop
26424#define INTERNAL_SANITIZERS_H
26425#define __MEMCHECK_H
26426#define __VALGRIND_H
26427#define __VALGRIND_MAJOR__ 3
26428#define __VALGRIND_MINOR__ 19
26429#undef PLAT_x86_darwin
26430#undef PLAT_amd64_darwin
26431#undef PLAT_x86_freebsd
26432#undef PLAT_amd64_freebsd
26433#undef PLAT_x86_win32
26434#undef PLAT_amd64_win64
26435#undef PLAT_x86_linux
26436#undef PLAT_amd64_linux
26437#undef PLAT_ppc32_linux
26438#undef PLAT_ppc64be_linux
26439#undef PLAT_ppc64le_linux
26440#undef PLAT_arm_linux
26441#undef PLAT_arm64_linux
26442#undef PLAT_s390x_linux
26443#undef PLAT_mips32_linux
26444#undef PLAT_mips64_linux
26445#undef PLAT_nanomips_linux
26446#undef PLAT_x86_solaris
26447#undef PLAT_amd64_solaris
26448#define PLAT_amd64_linux 1
26449#define VALGRIND_DO_CLIENT_REQUEST(_zzq_rlval,_zzq_default,_zzq_request,_zzq_arg1,_zzq_arg2,_zzq_arg3,_zzq_arg4,_zzq_arg5) do { (_zzq_rlval) = VALGRIND_DO_CLIENT_REQUEST_EXPR((_zzq_default), (_zzq_request), (_zzq_arg1), (_zzq_arg2), (_zzq_arg3), (_zzq_arg4), (_zzq_arg5)); } while (0)
26450#define VALGRIND_DO_CLIENT_REQUEST_STMT(_zzq_request,_zzq_arg1,_zzq_arg2,_zzq_arg3,_zzq_arg4,_zzq_arg5) do { (void) VALGRIND_DO_CLIENT_REQUEST_EXPR(0, (_zzq_request), (_zzq_arg1), (_zzq_arg2), (_zzq_arg3), (_zzq_arg4), (_zzq_arg5)); } while (0)
26451#define __SPECIAL_INSTRUCTION_PREAMBLE "rolq $3, %%rdi ; rolq $13, %%rdi\n\t" "rolq $61, %%rdi ; rolq $51, %%rdi\n\t"
26452#define VALGRIND_DO_CLIENT_REQUEST_EXPR(_zzq_default,_zzq_request,_zzq_arg1,_zzq_arg2,_zzq_arg3,_zzq_arg4,_zzq_arg5) __extension__ ({ volatile unsigned long int _zzq_args[6]; volatile unsigned long int _zzq_result; _zzq_args[0] = (unsigned long int)(_zzq_request); _zzq_args[1] = (unsigned long int)(_zzq_arg1); _zzq_args[2] = (unsigned long int)(_zzq_arg2); _zzq_args[3] = (unsigned long int)(_zzq_arg3); _zzq_args[4] = (unsigned long int)(_zzq_arg4); _zzq_args[5] = (unsigned long int)(_zzq_arg5); __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE "xchgq %%rbx,%%rbx" : "=d" (_zzq_result) : "a" (&_zzq_args[0]), "0" (_zzq_default) : "cc", "memory" ); _zzq_result; })
26453#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) { volatile OrigFn* _zzq_orig = &(_zzq_rlval); volatile unsigned long int __addr; __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE "xchgq %%rcx,%%rcx" : "=a" (__addr) : : "cc", "memory" ); _zzq_orig->nraddr = __addr; }
26454#define VALGRIND_CALL_NOREDIR_RAX __SPECIAL_INSTRUCTION_PREAMBLE "xchgq %%rdx,%%rdx\n\t"
26455#define VALGRIND_VEX_INJECT_IR() do { __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE "xchgq %%rdi,%%rdi\n\t" : : : "cc", "memory" ); } while (0)
26456#define VG_CONCAT4(_aa,_bb,_cc,_dd) _aa ##_bb ##_cc ##_dd
26457#define I_WRAP_SONAME_FNNAME_ZU(soname,fnname) VG_CONCAT4(_vgw00000ZU_,soname,_,fnname)
26458#define I_WRAP_SONAME_FNNAME_ZZ(soname,fnname) VG_CONCAT4(_vgw00000ZZ_,soname,_,fnname)
26459#define VALGRIND_GET_ORIG_FN(_lval) VALGRIND_GET_NR_CONTEXT(_lval)
26460#define I_REPLACE_SONAME_FNNAME_ZU(soname,fnname) VG_CONCAT4(_vgr00000ZU_,soname,_,fnname)
26461#define I_REPLACE_SONAME_FNNAME_ZZ(soname,fnname) VG_CONCAT4(_vgr00000ZZ_,soname,_,fnname)
26462#define CALL_FN_v_v(fnptr) do { volatile unsigned long _junk; CALL_FN_W_v(_junk,fnptr); } while (0)
26463#define CALL_FN_v_W(fnptr,arg1) do { volatile unsigned long _junk; CALL_FN_W_W(_junk,fnptr,arg1); } while (0)
26464#define CALL_FN_v_WW(fnptr,arg1,arg2) do { volatile unsigned long _junk; CALL_FN_W_WW(_junk,fnptr,arg1,arg2); } while (0)
26465#define CALL_FN_v_WWW(fnptr,arg1,arg2,arg3) do { volatile unsigned long _junk; CALL_FN_W_WWW(_junk,fnptr,arg1,arg2,arg3); } while (0)
26466#define CALL_FN_v_WWWW(fnptr,arg1,arg2,arg3,arg4) do { volatile unsigned long _junk; CALL_FN_W_WWWW(_junk,fnptr,arg1,arg2,arg3,arg4); } while (0)
26467#define CALL_FN_v_5W(fnptr,arg1,arg2,arg3,arg4,arg5) do { volatile unsigned long _junk; CALL_FN_W_5W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5); } while (0)
26468#define CALL_FN_v_6W(fnptr,arg1,arg2,arg3,arg4,arg5,arg6) do { volatile unsigned long _junk; CALL_FN_W_6W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5,arg6); } while (0)
26469#define CALL_FN_v_7W(fnptr,arg1,arg2,arg3,arg4,arg5,arg6,arg7) do { volatile unsigned long _junk; CALL_FN_W_7W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5,arg6,arg7); } while (0)
26470#define __CALLER_SAVED_REGS "rcx", "rdx", "rsi", "rdi", "r8", "r9", "r10", "r11"
26471#define __FRAME_POINTER ,"r"(__builtin_dwarf_cfa())
26472#define VALGRIND_CFI_PROLOGUE "movq %%rbp, %%r15\n\t" "movq %2, %%rbp\n\t" ".cfi_remember_state\n\t" ".cfi_def_cfa rbp, 0\n\t"
26473#define VALGRIND_CFI_EPILOGUE "movq %%r15, %%rbp\n\t" ".cfi_restore_state\n\t"
26474#define VALGRIND_ALIGN_STACK "movq %%rsp,%%r14\n\t" "andq $0xfffffffffffffff0,%%rsp\n\t"
26475#define VALGRIND_RESTORE_STACK "movq %%r14,%%rsp\n\t"
26476#define CALL_FN_W_v(lval,orig) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[1]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
26477#define CALL_FN_W_W(lval,orig,arg1) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[2]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
26478#define CALL_FN_W_WW(lval,orig,arg1,arg2) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[3]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
26479#define CALL_FN_W_WWW(lval,orig,arg1,arg2,arg3) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[4]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
26480#define CALL_FN_W_WWWW(lval,orig,arg1,arg2,arg3,arg4) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[5]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
26481#define CALL_FN_W_5W(lval,orig,arg1,arg2,arg3,arg4,arg5) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[6]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
26482#define CALL_FN_W_6W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[7]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
26483#define CALL_FN_W_7W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[8]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $136,%%rsp\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
26484#define CALL_FN_W_8W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[9]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); _argvec[8] = (unsigned long)(arg8); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "pushq 64(%%rax)\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
26485#define CALL_FN_W_9W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[10]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); _argvec[8] = (unsigned long)(arg8); _argvec[9] = (unsigned long)(arg9); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $136,%%rsp\n\t" "pushq 72(%%rax)\n\t" "pushq 64(%%rax)\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
26486#define CALL_FN_W_10W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[11]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); _argvec[8] = (unsigned long)(arg8); _argvec[9] = (unsigned long)(arg9); _argvec[10] = (unsigned long)(arg10); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "pushq 80(%%rax)\n\t" "pushq 72(%%rax)\n\t" "pushq 64(%%rax)\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
26487#define CALL_FN_W_11W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[12]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); _argvec[8] = (unsigned long)(arg8); _argvec[9] = (unsigned long)(arg9); _argvec[10] = (unsigned long)(arg10); _argvec[11] = (unsigned long)(arg11); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $136,%%rsp\n\t" "pushq 88(%%rax)\n\t" "pushq 80(%%rax)\n\t" "pushq 72(%%rax)\n\t" "pushq 64(%%rax)\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
26488#define CALL_FN_W_12W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[13]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); _argvec[8] = (unsigned long)(arg8); _argvec[9] = (unsigned long)(arg9); _argvec[10] = (unsigned long)(arg10); _argvec[11] = (unsigned long)(arg11); _argvec[12] = (unsigned long)(arg12); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "pushq 96(%%rax)\n\t" "pushq 88(%%rax)\n\t" "pushq 80(%%rax)\n\t" "pushq 72(%%rax)\n\t" "pushq 64(%%rax)\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
26489#define VG_USERREQ_TOOL_BASE(a,b) ((unsigned int)(((a)&0xff) << 24 | ((b)&0xff) << 16))
26490#define VG_IS_TOOL_USERREQ(a,b,v) (VG_USERREQ_TOOL_BASE(a,b) == ((v) & 0xffff0000))
26491#define RUNNING_ON_VALGRIND (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__RUNNING_ON_VALGRIND, 0, 0, 0, 0, 0)
26492#define VALGRIND_DISCARD_TRANSLATIONS(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DISCARD_TRANSLATIONS, _qzz_addr, _qzz_len, 0, 0, 0)
26493#define VALGRIND_INNER_THREADS(_qzz_addr) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__INNER_THREADS, _qzz_addr, 0, 0, 0, 0)
26494#define VALGRIND_NON_SIMD_CALL0(_qyy_fn) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__CLIENT_CALL0, _qyy_fn, 0, 0, 0, 0)
26495#define VALGRIND_NON_SIMD_CALL1(_qyy_fn,_qyy_arg1) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__CLIENT_CALL1, _qyy_fn, _qyy_arg1, 0, 0, 0)
26496#define VALGRIND_NON_SIMD_CALL2(_qyy_fn,_qyy_arg1,_qyy_arg2) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__CLIENT_CALL2, _qyy_fn, _qyy_arg1, _qyy_arg2, 0, 0)
26497#define VALGRIND_NON_SIMD_CALL3(_qyy_fn,_qyy_arg1,_qyy_arg2,_qyy_arg3) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__CLIENT_CALL3, _qyy_fn, _qyy_arg1, _qyy_arg2, _qyy_arg3, 0)
26498#define VALGRIND_COUNT_ERRORS (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR( 0 , VG_USERREQ__COUNT_ERRORS, 0, 0, 0, 0, 0)
26499#define VALGRIND_MALLOCLIKE_BLOCK(addr,sizeB,rzB,is_zeroed) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MALLOCLIKE_BLOCK, addr, sizeB, rzB, is_zeroed, 0)
26500#define VALGRIND_RESIZEINPLACE_BLOCK(addr,oldSizeB,newSizeB,rzB) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__RESIZEINPLACE_BLOCK, addr, oldSizeB, newSizeB, rzB, 0)
26501#define VALGRIND_FREELIKE_BLOCK(addr,rzB) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__FREELIKE_BLOCK, addr, rzB, 0, 0, 0)
26502#define VALGRIND_CREATE_MEMPOOL(pool,rzB,is_zeroed) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CREATE_MEMPOOL, pool, rzB, is_zeroed, 0, 0)
26503#define VALGRIND_MEMPOOL_AUTO_FREE 1
26504#define VALGRIND_MEMPOOL_METAPOOL 2
26505#define VALGRIND_CREATE_MEMPOOL_EXT(pool,rzB,is_zeroed,flags) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CREATE_MEMPOOL, pool, rzB, is_zeroed, flags, 0)
26506#define VALGRIND_DESTROY_MEMPOOL(pool) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DESTROY_MEMPOOL, pool, 0, 0, 0, 0)
26507#define VALGRIND_MEMPOOL_ALLOC(pool,addr,size) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_ALLOC, pool, addr, size, 0, 0)
26508#define VALGRIND_MEMPOOL_FREE(pool,addr) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_FREE, pool, addr, 0, 0, 0)
26509#define VALGRIND_MEMPOOL_TRIM(pool,addr,size) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_TRIM, pool, addr, size, 0, 0)
26510#define VALGRIND_MOVE_MEMPOOL(poolA,poolB) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MOVE_MEMPOOL, poolA, poolB, 0, 0, 0)
26511#define VALGRIND_MEMPOOL_CHANGE(pool,addrA,addrB,size) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_CHANGE, pool, addrA, addrB, size, 0)
26512#define VALGRIND_MEMPOOL_EXISTS(pool) (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__MEMPOOL_EXISTS, pool, 0, 0, 0, 0)
26513#define VALGRIND_STACK_REGISTER(start,end) (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__STACK_REGISTER, start, end, 0, 0, 0)
26514#define VALGRIND_STACK_DEREGISTER(id) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__STACK_DEREGISTER, id, 0, 0, 0, 0)
26515#define VALGRIND_STACK_CHANGE(id,start,end) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__STACK_CHANGE, id, start, end, 0, 0)
26516#define VALGRIND_LOAD_PDB_DEBUGINFO(fd,ptr,total_size,delta) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__LOAD_PDB_DEBUGINFO, fd, ptr, total_size, delta, 0)
26517#define VALGRIND_MAP_IP_TO_SRCLOC(addr,buf64) (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__MAP_IP_TO_SRCLOC, addr, buf64, 0, 0, 0)
26518#define VALGRIND_DISABLE_ERROR_REPORTING VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CHANGE_ERR_DISABLEMENT, 1, 0, 0, 0, 0)
26519#define VALGRIND_ENABLE_ERROR_REPORTING VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CHANGE_ERR_DISABLEMENT, -1, 0, 0, 0, 0)
26520#define VALGRIND_MONITOR_COMMAND(command) VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__GDB_MONITOR_COMMAND, command, 0, 0, 0, 0)
26521#define VALGRIND_CLO_CHANGE(option) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CLO_CHANGE, option, 0, 0, 0, 0)
26522#undef PLAT_x86_darwin
26523#undef PLAT_amd64_darwin
26524#undef PLAT_x86_win32
26525#undef PLAT_amd64_win64
26526#undef PLAT_x86_linux
26527#undef PLAT_amd64_linux
26528#undef PLAT_ppc32_linux
26529#undef PLAT_ppc64be_linux
26530#undef PLAT_ppc64le_linux
26531#undef PLAT_arm_linux
26532#undef PLAT_s390x_linux
26533#undef PLAT_mips32_linux
26534#undef PLAT_mips64_linux
26535#undef PLAT_nanomips_linux
26536#undef PLAT_x86_solaris
26537#undef PLAT_amd64_solaris
26538#define VALGRIND_MAKE_MEM_NOACCESS(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__MAKE_MEM_NOACCESS, (_qzz_addr), (_qzz_len), 0, 0, 0)
26539#define VALGRIND_MAKE_MEM_UNDEFINED(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__MAKE_MEM_UNDEFINED, (_qzz_addr), (_qzz_len), 0, 0, 0)
26540#define VALGRIND_MAKE_MEM_DEFINED(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__MAKE_MEM_DEFINED, (_qzz_addr), (_qzz_len), 0, 0, 0)
26541#define VALGRIND_MAKE_MEM_DEFINED_IF_ADDRESSABLE(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__MAKE_MEM_DEFINED_IF_ADDRESSABLE, (_qzz_addr), (_qzz_len), 0, 0, 0)
26542#define VALGRIND_CREATE_BLOCK(_qzz_addr,_qzz_len,_qzz_desc) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__CREATE_BLOCK, (_qzz_addr), (_qzz_len), (_qzz_desc), 0, 0)
26543#define VALGRIND_DISCARD(_qzz_blkindex) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__DISCARD, 0, (_qzz_blkindex), 0, 0, 0)
26544#define VALGRIND_CHECK_MEM_IS_ADDRESSABLE(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__CHECK_MEM_IS_ADDRESSABLE, (_qzz_addr), (_qzz_len), 0, 0, 0)
26545#define VALGRIND_CHECK_MEM_IS_DEFINED(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__CHECK_MEM_IS_DEFINED, (_qzz_addr), (_qzz_len), 0, 0, 0)
26546#define VALGRIND_CHECK_VALUE_IS_DEFINED(__lvalue) VALGRIND_CHECK_MEM_IS_DEFINED( (volatile unsigned char *)&(__lvalue), (unsigned long)(sizeof (__lvalue)))
26547#define VALGRIND_DO_LEAK_CHECK VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK, 0, 0, 0, 0, 0)
26548#define VALGRIND_DO_ADDED_LEAK_CHECK VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK, 0, 1, 0, 0, 0)
26549#define VALGRIND_DO_CHANGED_LEAK_CHECK VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK, 0, 2, 0, 0, 0)
26550#define VALGRIND_DO_QUICK_LEAK_CHECK VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK, 1, 0, 0, 0, 0)
26551#define VALGRIND_COUNT_LEAKS(leaked,dubious,reachable,suppressed) { unsigned long _qzz_leaked = 0, _qzz_dubious = 0; unsigned long _qzz_reachable = 0, _qzz_suppressed = 0; VALGRIND_DO_CLIENT_REQUEST_STMT( VG_USERREQ__COUNT_LEAKS, &_qzz_leaked, &_qzz_dubious, &_qzz_reachable, &_qzz_suppressed, 0); leaked = _qzz_leaked; dubious = _qzz_dubious; reachable = _qzz_reachable; suppressed = _qzz_suppressed; }
26552#define VALGRIND_COUNT_LEAK_BLOCKS(leaked,dubious,reachable,suppressed) { unsigned long _qzz_leaked = 0, _qzz_dubious = 0; unsigned long _qzz_reachable = 0, _qzz_suppressed = 0; VALGRIND_DO_CLIENT_REQUEST_STMT( VG_USERREQ__COUNT_LEAK_BLOCKS, &_qzz_leaked, &_qzz_dubious, &_qzz_reachable, &_qzz_suppressed, 0); leaked = _qzz_leaked; dubious = _qzz_dubious; reachable = _qzz_reachable; suppressed = _qzz_suppressed; }
26553#define VALGRIND_GET_VBITS(zza,zzvbits,zznbytes) (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__GET_VBITS, (const char*)(zza), (char*)(zzvbits), (zznbytes), 0, 0)
26554#define VALGRIND_SET_VBITS(zza,zzvbits,zznbytes) (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__SET_VBITS, (const char*)(zza), (const char*)(zzvbits), (zznbytes), 0, 0 )
26555#define VALGRIND_DISABLE_ADDR_ERROR_REPORTING_IN_RANGE(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__DISABLE_ADDR_ERROR_REPORTING_IN_RANGE, (_qzz_addr), (_qzz_len), 0, 0, 0)
26556#define VALGRIND_ENABLE_ADDR_ERROR_REPORTING_IN_RANGE(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__ENABLE_ADDR_ERROR_REPORTING_IN_RANGE, (_qzz_addr), (_qzz_len), 0, 0, 0)
26557#define SANITIZER_ASAN_INTERFACE_H
26558#define SANITIZER_COMMON_INTERFACE_DEFS_H
26559#define ASAN_POISON_MEMORY_REGION(addr,size) ((void)(addr), (void)(size))
26560#define ASAN_UNPOISON_MEMORY_REGION(addr,size) ((void)(addr), (void)(size))
26561#define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) NO_SANITIZE_ADDRESS(NOINLINE(x))
26562#undef NO_SANITIZE
26563#define NO_SANITIZE(x,y) COMPILER_WARNING_PUSH; COMPILER_WARNING_IGNORED(-Wattributes); __attribute__((__no_sanitize__(x))) y; COMPILER_WARNING_POP
26564#define __asan_poison_memory_region(x,y)
26565#define __asan_unpoison_memory_region(x,y)
26566#define __asan_region_is_poisoned(x,y) 0
26567#define __msan_allocated_memory(x,y) ((void)(x), (void)(y))
26568#define __msan_poison(x,y) ((void)(x), (void)(y))
26569#define __msan_unpoison(x,y) ((void)(x), (void)(y))
26570#define __msan_unpoison_string(x) ((void)(x))
26571#define RUBY_ISEQ_H 1
26572#define ISEQ_MAJOR_VERSION ((unsigned int)ruby_api_version[0])
26573#define ISEQ_MINOR_VERSION ((unsigned int)ruby_api_version[1])
26574#define USE_ISEQ_NODE_ID 1
26575#define ISEQ_COVERAGE(iseq) ISEQ_BODY(iseq)->variable.coverage
26576#define ISEQ_COVERAGE_SET(iseq,cov) RB_OBJ_WRITE(iseq, &ISEQ_BODY(iseq)->variable.coverage, cov)
26577#define ISEQ_LINE_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_LINES)
26578#define ISEQ_BRANCH_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_BRANCHES)
26579#define ISEQ_PC2BRANCHINDEX(iseq) ISEQ_BODY(iseq)->variable.pc2branchindex
26580#define ISEQ_PC2BRANCHINDEX_SET(iseq,h) RB_OBJ_WRITE(iseq, &ISEQ_BODY(iseq)->variable.pc2branchindex, h)
26581#define ISEQ_FLIP_CNT(iseq) ISEQ_BODY(iseq)->variable.flip_count
26582#define ISEQ_TRACE_EVENTS (RUBY_EVENT_LINE | RUBY_EVENT_CLASS | RUBY_EVENT_END | RUBY_EVENT_CALL | RUBY_EVENT_RETURN| RUBY_EVENT_C_CALL| RUBY_EVENT_C_RETURN| RUBY_EVENT_B_CALL| RUBY_EVENT_B_RETURN| RUBY_EVENT_COVERAGE_LINE| RUBY_EVENT_COVERAGE_BRANCH)
26583#define ISEQ_NOT_LOADED_YET IMEMO_FL_USER1
26584#define ISEQ_USE_COMPILE_DATA IMEMO_FL_USER2
26585#define ISEQ_TRANSLATED IMEMO_FL_USER3
26586#define ISEQ_MARKABLE_ISEQ IMEMO_FL_USER4
26587#define ISEQ_EXECUTABLE_P(iseq) (FL_TEST_RAW(((VALUE)iseq), ISEQ_NOT_LOADED_YET | ISEQ_USE_COMPILE_DATA) == 0)
26588#pragma GCC visibility push(default)
26589#define INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE (512)
26590#pragma GCC visibility pop
26591#define RUBY_MJIT_H 1
26592#define USE_DEBUG_COUNTER 0
26593#define RUBY_DEBUG_COUNTER_H 1
26594#define RB_DEBUG_COUNTER(name) RB_DEBUG_COUNTER_ ##name,
26595#undef RB_DEBUG_COUNTER
26596#define RB_DEBUG_COUNTER_INC(type) ((void)0)
26597#define RB_DEBUG_COUNTER_INC_UNLESS(type,cond) (!!(cond))
26598#define RB_DEBUG_COUNTER_INC_IF(type,cond) (!!(cond))
26599#define RB_DEBUG_COUNTER_ADD(type,num) ((void)0)
26600#define RB_DEBUG_COUNTER_SETMAX(type,num) 0
26601#pragma GCC visibility push(default)
26602#pragma GCC visibility pop
26603#define RUBY_H 1
26604#define HAVE_RUBY_ATOMIC_H 1
26605#define HAVE_RUBY_DEBUG_H 1
26606#define HAVE_RUBY_DEFINES_H 1
26607#define HAVE_RUBY_ENCODING_H 1
26608#define HAVE_RUBY_FIBER_SCHEDULER_H 1
26609#define HAVE_RUBY_INTERN_H 1
26610#define HAVE_RUBY_IO_H 1
26611#define HAVE_RUBY_MEMORY_VIEW_H 1
26612#define HAVE_RUBY_MISSING_H 1
26613#define HAVE_RUBY_ONIGMO_H 1
26614#define HAVE_RUBY_ONIGURUMA_H 1
26615#define HAVE_RUBY_RACTOR_H 1
26616#define HAVE_RUBY_RANDOM_H 1
26617#define HAVE_RUBY_RE_H 1
26618#define HAVE_RUBY_REGEX_H 1
26619#define HAVE_RUBY_RUBY_H 1
26620#define HAVE_RUBY_ST_H 1
26621#define HAVE_RUBY_THREAD_H 1
26622#define HAVE_RUBY_THREAD_NATIVE_H 1
26623#define HAVE_RUBY_UTIL_H 1
26624#define HAVE_RUBY_VERSION_H 1
26625#define HAVE_RUBY_VM_H 1
26626#define YJIT_H 1
26627#define YJIT_STATS RUBY_DEBUG
26628#define YJIT_SUPPORTED_P 1
26629#define YJIT_BUILD 0
26630#pragma GCC visibility push(default)
26631#pragma GCC visibility pop
26632#define mjit_enabled true
26633#define RUBY_VM_H 1
26634#pragma GCC visibility push(default)
26635#pragma GCC visibility pop
26636#define RUBY_VM_CALLINFO_H
26637#define VM_CALL_ARGS_SPLAT (0x01 << VM_CALL_ARGS_SPLAT_bit)
26638#define VM_CALL_ARGS_BLOCKARG (0x01 << VM_CALL_ARGS_BLOCKARG_bit)
26639#define VM_CALL_FCALL (0x01 << VM_CALL_FCALL_bit)
26640#define VM_CALL_VCALL (0x01 << VM_CALL_VCALL_bit)
26641#define VM_CALL_ARGS_SIMPLE (0x01 << VM_CALL_ARGS_SIMPLE_bit)
26642#define VM_CALL_BLOCKISEQ (0x01 << VM_CALL_BLOCKISEQ_bit)
26643#define VM_CALL_KWARG (0x01 << VM_CALL_KWARG_bit)
26644#define VM_CALL_KW_SPLAT (0x01 << VM_CALL_KW_SPLAT_bit)
26645#define VM_CALL_TAILCALL (0x01 << VM_CALL_TAILCALL_bit)
26646#define VM_CALL_SUPER (0x01 << VM_CALL_SUPER_bit)
26647#define VM_CALL_ZSUPER (0x01 << VM_CALL_ZSUPER_bit)
26648#define VM_CALL_OPT_SEND (0x01 << VM_CALL_OPT_SEND_bit)
26649#define VM_CALL_KW_SPLAT_MUT (0x01 << VM_CALL_KW_SPLAT_MUT_bit)
26650#define USE_EMBED_CI 1
26651#define CI_EMBED_TAG_bits 1
26652#define CI_EMBED_ARGC_bits 15
26653#define CI_EMBED_FLAG_bits 16
26654#define CI_EMBED_ID_bits 32
26655#define CI_EMBED_FLAG 0x01
26656#define CI_EMBED_ARGC_SHFT (CI_EMBED_TAG_bits)
26657#define CI_EMBED_ARGC_MASK ((((VALUE)1)<<CI_EMBED_ARGC_bits) - 1)
26658#define CI_EMBED_FLAG_SHFT (CI_EMBED_TAG_bits + CI_EMBED_ARGC_bits)
26659#define CI_EMBED_FLAG_MASK ((((VALUE)1)<<CI_EMBED_FLAG_bits) - 1)
26660#define CI_EMBED_ID_SHFT (CI_EMBED_TAG_bits + CI_EMBED_ARGC_bits + CI_EMBED_FLAG_bits)
26661#define CI_EMBED_ID_MASK ((((VALUE)1)<<CI_EMBED_ID_bits) - 1)
26662#define vm_ci_new(mid,flag,argc,kwarg) vm_ci_new_(mid, flag, argc, kwarg, __FILE__, __LINE__)
26663#define vm_ci_new_runtime(mid,flag,argc,kwarg) vm_ci_new_runtime_(mid, flag, argc, kwarg, __FILE__, __LINE__)
26664#define VM_CI_EMBEDDABLE_P(mid,flag,argc,kwarg) (((mid ) & ~CI_EMBED_ID_MASK) ? false : ((flag) & ~CI_EMBED_FLAG_MASK) ? false : ((argc) & ~CI_EMBED_ARGC_MASK) ? false : (kwarg) ? false : true)
26665#define vm_ci_new_id(mid,flag,argc,must_zero) ((const struct rb_callinfo *) ((((VALUE)(mid )) << CI_EMBED_ID_SHFT) | (((VALUE)(flag)) << CI_EMBED_FLAG_SHFT) | (((VALUE)(argc)) << CI_EMBED_ARGC_SHFT) | RUBY_FIXNUM_FLAG))
26666#define VM_CALLINFO_NOT_UNDER_GC IMEMO_FL_USER0
26667#define VM_CI_ON_STACK(mid_,flags_,argc_,kwarg_) (struct rb_callinfo) { .flags = T_IMEMO | (imemo_callinfo << FL_USHIFT) | VM_CALLINFO_NOT_UNDER_GC, .mid = mid_, .flag = flags_, .argc = argc_, .kwarg = kwarg_, }
26668#define VM_CALLCACHE_UNMARKABLE IMEMO_FL_USER0
26669#define VM_CALLCACHE_ON_STACK IMEMO_FL_USER1
26670#define VM_CC_ON_STACK(clazz,call,aux,cme) (struct rb_callcache) { .flags = T_IMEMO | (imemo_callcache << FL_USHIFT) | VM_CALLCACHE_UNMARKABLE | VM_CALLCACHE_ON_STACK, .klass = clazz, .cme_ = cme, .call_ = call, .aux_ = aux, }
26671#define vm_cc_empty() rb_vm_empty_cc()
26672#define RUBY_DEBUG_H
26673#pragma GCC visibility push(default)
26674#define dpv(h,v) ruby_debug_print_value(-1, 0, (h), (v))
26675#define dp(v) ruby_debug_print_value(-1, 0, "", (v))
26676#define dpi(i) ruby_debug_print_id(-1, 0, "", (i))
26677#define dpn(n) ruby_debug_print_node(-1, 0, "", (n))
26678#pragma GCC visibility pop
26679#define USE_RUBY_DEBUG_LOG 0
26680#define _RUBY_DEBUG_LOG(...) ruby_debug_log(__FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING, "" __VA_ARGS__)
26681#define RUBY_DEBUG_LOG(...)
26682#define RUBY_DEBUG_LOG2(file,line,...)
26683#define RUBY_VM_EXEC_H
26684#define debugs
26685#define DEBUG_ENTER_INSN(insn)
26686#define DEBUG_END_INSN()
26687#define throwdebug if(0)ruby_debug_printf
26688#define USE_INSNS_COUNTER 0
26689#define LABEL(x) INSN_LABEL_ ##x
26690#define ELABEL(x) INSN_ELABEL_ ##x
26691#define LABEL_PTR(x) RB_GNUC_EXTENSION(&&LABEL(x))
26692#define INSN_ENTRY_SIG(insn) if (0) { ruby_debug_printf("exec: %s@(%"PRIdPTRDIFF", %"PRIdPTRDIFF")@%s:%u\n", #insn, (reg_pc - ISEQ_BODY(reg_cfp->iseq)->iseq_encoded), (reg_cfp->pc - ISEQ_BODY(reg_cfp->iseq)->iseq_encoded), RSTRING_PTR(rb_iseq_path(reg_cfp->iseq)), rb_iseq_line_no(reg_cfp->iseq, reg_pc - ISEQ_BODY(reg_cfp->iseq)->iseq_encoded)); } if (USE_INSNS_COUNTER) vm_insns_counter_count_insn(BIN(insn));
26693#define INSN_DISPATCH_SIG(insn)
26694#define INSN_ENTRY(insn) LABEL(insn): INSN_ENTRY_SIG(insn);
26695#define TC_DISPATCH(insn) INSN_DISPATCH_SIG(insn); RB_GNUC_EXTENSION_BLOCK(goto *(void const *)GET_CURRENT_INSN()); ;
26696#define END_INSN(insn) DEBUG_END_INSN(); TC_DISPATCH(insn);
26697#define INSN_DISPATCH() TC_DISPATCH(__START__) {
26698#define END_INSNS_DISPATCH() rb_bug("unknown insn: %"PRIdVALUE, GET_CURRENT_INSN()); }
26699#define NEXT_INSN() TC_DISPATCH(__NEXT_INSN__)
26700#define START_OF_ORIGINAL_INSN(x) if (0) goto start_of_ ##x; start_of_ ##x:
26701#define DISPATCH_ORIGINAL_INSN(x) goto start_of_ ##x;
26702#define VM_SP_CNT(ec,sp) ((sp) - (ec)->vm_stack)
26703#define THROW_EXCEPTION(exc) do { ec->errinfo = (VALUE)(exc); EC_JUMP_TAG(ec, ec->tag->state); } while (0)
26704#define SCREG(r) (reg_ ##r)
26705#define VM_DEBUG_STACKOVERFLOW 0
26706#define CHECK_VM_STACK_OVERFLOW_FOR_INSN(cfp,margin)
26707#define INSN_LABEL2(insn,name) INSN_LABEL_ ## insn ## _ ## name
26708#define INSN_LABEL(x) INSN_LABEL2(NAME_OF_CURRENT_INSN, x)
26709#define RUBY_INSNHELPER_H
26710#pragma GCC visibility push(default)
26711#pragma GCC visibility pop
26712#define COLLECT_USAGE_INSN(insn)
26713#define COLLECT_USAGE_OPERAND(insn,n,op)
26714#define COLLECT_USAGE_REGISTER(reg,s)
26715#define PUSH(x) (SET_SV(x), INC_SP(1))
26716#define TOPN(n) (*(GET_SP()-(n)-1))
26717#define POPN(n) (DEC_SP(n))
26718#define POP() (DEC_SP(1))
26719#define STACK_ADDR_FROM_TOP(n) (GET_SP()-(n))
26720#define VM_REG_CFP (reg_cfp)
26721#define VM_REG_PC (VM_REG_CFP->pc)
26722#define VM_REG_SP (VM_REG_CFP->sp)
26723#define VM_REG_EP (VM_REG_CFP->ep)
26724#define RESTORE_REGS() do { VM_REG_CFP = ec->cfp; } while (0)
26725#define COLLECT_USAGE_REGISTER_HELPER(a,b,v) (v)
26726#define GET_PC() (COLLECT_USAGE_REGISTER_HELPER(PC, GET, VM_REG_PC))
26727#define SET_PC(x) (VM_REG_PC = (COLLECT_USAGE_REGISTER_HELPER(PC, SET, (x))))
26728#define GET_CURRENT_INSN() (*GET_PC())
26729#define GET_OPERAND(n) (GET_PC()[(n)])
26730#define ADD_PC(n) (SET_PC(VM_REG_PC + (n)))
26731#define JUMP(dst) (SET_PC(VM_REG_PC + (dst)))
26732#define GET_CFP() (COLLECT_USAGE_REGISTER_HELPER(CFP, GET, VM_REG_CFP))
26733#define GET_EP() (COLLECT_USAGE_REGISTER_HELPER(EP, GET, VM_REG_EP))
26734#define SET_EP(x) (VM_REG_EP = (COLLECT_USAGE_REGISTER_HELPER(EP, SET, (x))))
26735#define GET_LEP() (VM_EP_LEP(GET_EP()))
26736#define GET_SP() (COLLECT_USAGE_REGISTER_HELPER(SP, GET, VM_REG_SP))
26737#define SET_SP(x) (VM_REG_SP = (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
26738#define INC_SP(x) (VM_REG_SP += (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
26739#define DEC_SP(x) (VM_REG_SP -= (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
26740#define SET_SV(x) (*GET_SP() = rb_ractor_confirm_belonging(x))
26741#define GET_ISEQ() (GET_CFP()->iseq)
26742#define GET_PREV_EP(ep) ((VALUE *)((ep)[VM_ENV_DATA_INDEX_SPECVAL] & ~0x03))
26743#define GET_SELF() (COLLECT_USAGE_REGISTER_HELPER(SELF, GET, GET_CFP()->self))
26744#define GET_BLOCK_HANDLER() (GET_LEP()[VM_ENV_DATA_INDEX_SPECVAL])
26745#define SETUP_CANARY(cond) if (cond) {} else {}
26746#define CHECK_CANARY(cond,insn) if (cond) {(void)(insn);}
26747#define PREV_CLASS_SERIAL() (ruby_vm_class_serial)
26748#define NEXT_CLASS_SERIAL() (++ruby_vm_class_serial)
26749#define GET_GLOBAL_CVAR_STATE() (ruby_vm_global_cvar_state)
26750#define INC_GLOBAL_CVAR_STATE() (++ruby_vm_global_cvar_state)
26751#define IS_ARGS_SPLAT(ci) (vm_ci_flag(ci) & VM_CALL_ARGS_SPLAT)
26752#define IS_ARGS_KEYWORD(ci) (vm_ci_flag(ci) & VM_CALL_KWARG)
26753#define IS_ARGS_KW_SPLAT(ci) (vm_ci_flag(ci) & VM_CALL_KW_SPLAT)
26754#define IS_ARGS_KW_OR_KW_SPLAT(ci) (vm_ci_flag(ci) & (VM_CALL_KWARG | VM_CALL_KW_SPLAT))
26755#define IS_ARGS_KW_SPLAT_MUT(ci) (vm_ci_flag(ci) & VM_CALL_KW_SPLAT_MUT)
26756#define RUBY_RACTOR_H 1
26757#pragma GCC visibility push(default)
26758#define RB_RACTOR_LOCAL_STORAGE_TYPE_FREE (&rb_ractor_local_storage_type_free)
26759#pragma GCC visibility pop
26760#define RB_OBJ_SHAREABLE_P(obj) FL_TEST_RAW((obj), RUBY_FL_SHAREABLE)
26761#define RACTOR_CHECK_MODE (0 || VM_CHECK_MODE || RUBY_DEBUG)
26762#pragma GCC visibility push(default)
26763#pragma GCC visibility pop
26764#define rb_ractor_set_current_ec(cr,ec) rb_ractor_set_current_ec_(cr, ec, __FILE__, __LINE__)
26765#define rb_ractor_confirm_belonging(obj) obj
26766#define RUBY_VM_SYNC_H
26767#define LOCATION_ARGS void
26768#define LOCATION_PARAMS
26769#define APPEND_LOCATION_ARGS
26770#define APPEND_LOCATION_PARAMS
26771#define RB_VM_LOCKED_P() rb_vm_locked_p()
26772#define RB_VM_LOCK() rb_vm_lock(__FILE__, __LINE__)
26773#define RB_VM_UNLOCK() rb_vm_unlock(__FILE__, __LINE__)
26774#define RB_VM_LOCK_ENTER_CR_LEV(cr,levp) rb_vm_lock_enter_cr(cr, levp, __FILE__, __LINE__)
26775#define RB_VM_LOCK_LEAVE_CR_LEV(cr,levp) rb_vm_lock_leave_cr(cr, levp, __FILE__, __LINE__)
26776#define RB_VM_LOCK_ENTER_LEV(levp) rb_vm_lock_enter(levp, __FILE__, __LINE__)
26777#define RB_VM_LOCK_LEAVE_LEV(levp) rb_vm_lock_leave(levp, __FILE__, __LINE__)
26778#define RB_VM_LOCK_ENTER() { unsigned int _lev; RB_VM_LOCK_ENTER_LEV(&_lev);
26779#define RB_VM_LOCK_LEAVE() RB_VM_LOCK_LEAVE_LEV(&_lev); }
26780#define RB_VM_LOCK_ENTER_LEV_NB(levp) rb_vm_lock_enter_nb(levp, __FILE__, __LINE__)
26781#define RB_VM_LOCK_ENTER_NO_BARRIER() { unsigned int _lev; RB_VM_LOCK_ENTER_LEV_NB(&_lev);
26782#define RB_VM_LOCK_LEAVE_NO_BARRIER() RB_VM_LOCK_LEAVE_LEV(&_lev); }
26783#define ASSERT_vm_locking()
26784#define ASSERT_vm_unlocking()
26785#define BUILTIN_H_INCLUDED
26786#define RB_BUILTIN_FUNCTION(_i,_name,_fname,_arity,_compiler) { .name = #_name, .func_ptr = (void *)_fname, .argc = _arity, .index = _i, .compiler = _compiler, }
26787#define _PROBES_H
26788#define DTRACE_PROBES_DISABLED 1
26789#define RUBY_DTRACE_METHOD_ENTRY_ENABLED() 0
26790#define RUBY_DTRACE_METHOD_ENTRY(classname,methodname,filename,lineno) do {} while (0)
26791#define RUBY_DTRACE_METHOD_RETURN_ENABLED() 0
26792#define RUBY_DTRACE_METHOD_RETURN(classname,methodname,filename,lineno) do {} while (0)
26793#define RUBY_DTRACE_CMETHOD_ENTRY_ENABLED() 0
26794#define RUBY_DTRACE_CMETHOD_ENTRY(classname,methodname,filename,lineno) do {} while (0)
26795#define RUBY_DTRACE_CMETHOD_RETURN_ENABLED() 0
26796#define RUBY_DTRACE_CMETHOD_RETURN(classname,methodname,filename,lineno) do {} while (0)
26797#define RUBY_DTRACE_REQUIRE_ENTRY_ENABLED() 0
26798#define RUBY_DTRACE_REQUIRE_ENTRY(rquiredfile,filename,lineno) do {} while (0)
26799#define RUBY_DTRACE_REQUIRE_RETURN_ENABLED() 0
26800#define RUBY_DTRACE_REQUIRE_RETURN(requiredfile,filename,lineno) do {} while (0)
26801#define RUBY_DTRACE_FIND_REQUIRE_ENTRY_ENABLED() 0
26802#define RUBY_DTRACE_FIND_REQUIRE_ENTRY(requiredfile,filename,lineno) do {} while (0)
26803#define RUBY_DTRACE_FIND_REQUIRE_RETURN_ENABLED() 0
26804#define RUBY_DTRACE_FIND_REQUIRE_RETURN(requiredfile,filename,lineno) do {} while (0)
26805#define RUBY_DTRACE_LOAD_ENTRY_ENABLED() 0
26806#define RUBY_DTRACE_LOAD_ENTRY(loadedfile,filename,lineno) do {} while (0)
26807#define RUBY_DTRACE_LOAD_RETURN_ENABLED() 0
26808#define RUBY_DTRACE_LOAD_RETURN(loadedfile,filename,lineno) do {} while (0)
26809#define RUBY_DTRACE_RAISE_ENABLED() 0
26810#define RUBY_DTRACE_RAISE(classname,filename,lineno) do {} while (0)
26811#define RUBY_DTRACE_OBJECT_CREATE_ENABLED() 0
26812#define RUBY_DTRACE_OBJECT_CREATE(classname,filename,lineno) do {} while (0)
26813#define RUBY_DTRACE_ARRAY_CREATE_ENABLED() 0
26814#define RUBY_DTRACE_ARRAY_CREATE(length,filename,lineno) do {} while (0)
26815#define RUBY_DTRACE_HASH_CREATE_ENABLED() 0
26816#define RUBY_DTRACE_HASH_CREATE(length,filename,lineno) do {} while (0)
26817#define RUBY_DTRACE_STRING_CREATE_ENABLED() 0
26818#define RUBY_DTRACE_STRING_CREATE(length,filename,lineno) do {} while (0)
26819#define RUBY_DTRACE_SYMBOL_CREATE_ENABLED() 0
26820#define RUBY_DTRACE_SYMBOL_CREATE(str,filename,lineno) do {} while (0)
26821#define RUBY_DTRACE_PARSE_BEGIN_ENABLED() 0
26822#define RUBY_DTRACE_PARSE_BEGIN(sourcefile,lineno) do {} while (0)
26823#define RUBY_DTRACE_PARSE_END_ENABLED() 0
26824#define RUBY_DTRACE_PARSE_END(sourcefile,lineno) do {} while (0)
26825#define RUBY_DTRACE_INSN_ENABLED() 0
26826#define RUBY_DTRACE_INSN(insns_name) do {} while (0)
26827#define RUBY_DTRACE_INSN_OPERAND_ENABLED() 0
26828#define RUBY_DTRACE_INSN_OPERAND(val,insns_name) do {} while (0)
26829#define RUBY_DTRACE_GC_MARK_BEGIN_ENABLED() 0
26830#define RUBY_DTRACE_GC_MARK_BEGIN() do {} while (0)
26831#define RUBY_DTRACE_GC_MARK_END_ENABLED() 0
26832#define RUBY_DTRACE_GC_MARK_END() do {} while (0)
26833#define RUBY_DTRACE_GC_SWEEP_BEGIN_ENABLED() 0
26834#define RUBY_DTRACE_GC_SWEEP_BEGIN() do {} while (0)
26835#define RUBY_DTRACE_GC_SWEEP_END_ENABLED() 0
26836#define RUBY_DTRACE_GC_SWEEP_END() do {} while (0)
26837#define RUBY_PROBES_HELPER_H
26838#pragma GCC visibility push(default)
26839#pragma GCC visibility pop
26840#define RUBY_DTRACE_METHOD_HOOK(name,ec,klazz,id) do { if (UNLIKELY(RUBY_DTRACE_ ##name ##_ENABLED())) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, klazz, id, &args)) { RUBY_DTRACE_ ##name(args.classname, args.methodname, args.filename, args.line_no); } } } while (0)
26841#define RUBY_DTRACE_METHOD_ENTRY_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(METHOD_ENTRY, ec, klass, id)
26842#define RUBY_DTRACE_METHOD_RETURN_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(METHOD_RETURN, ec, klass, id)
26843#define RUBY_DTRACE_CMETHOD_ENTRY_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(CMETHOD_ENTRY, ec, klass, id)
26844#define RUBY_DTRACE_CMETHOD_RETURN_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(CMETHOD_RETURN, ec, klass, id)
26845#pragma GCC diagnostic push
26846#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
26847#pragma GCC diagnostic pop
26848#define CONSTANT_H
26849#define RB_CONST_PRIVATE_P(ce) (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PRIVATE)
26850#define RB_CONST_PUBLIC_P(ce) (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PUBLIC)
26851#define RB_CONST_DEPRECATED_P(ce) ((ce)->flag & CONST_DEPRECATED)
26852#pragma GCC visibility push(default)
26853#pragma GCC visibility pop
26854#define INTERNAL_COMPAR_H
26855#define STRING_P(s) (RB_TYPE_P((s), T_STRING) && CLASS_OF(s) == rb_cString)
26856#define NEW_CMP_OPT_MEMO(type,value) NEW_PARTIAL_MEMO_FOR(type, value, cmp_opt)
26857#define CMP_OPTIMIZABLE_BIT(type) (1U << TOKEN_PASTE(cmp_opt_,type))
26858#define CMP_OPTIMIZABLE(data,type) (((data).opt_inited & CMP_OPTIMIZABLE_BIT(type)) ? ((data).opt_methods & CMP_OPTIMIZABLE_BIT(type)) : (((data).opt_inited |= CMP_OPTIMIZABLE_BIT(type)), rb_method_basic_definition_p(TOKEN_PASTE(rb_c,type), id_cmp) && ((data).opt_methods |= CMP_OPTIMIZABLE_BIT(type))))
26859#define OPTIMIZED_CMP(a,b,data) ((FIXNUM_P(a) && FIXNUM_P(b) && CMP_OPTIMIZABLE(data, Integer)) ? (((long)a > (long)b) ? 1 : ((long)a < (long)b) ? -1 : 0) : (STRING_P(a) && STRING_P(b) && CMP_OPTIMIZABLE(data, String)) ? rb_str_cmp(a, b) : (RB_FLOAT_TYPE_P(a) && RB_FLOAT_TYPE_P(b) && CMP_OPTIMIZABLE(data, Float)) ? rb_float_cmp(a, b) : rb_cmpint(rb_funcallv(a, id_cmp, 1, &b), a, b))
26860#define INTERNAL_HASH_H
26861#define RHASH_AR_TABLE_MAX_SIZE SIZEOF_VALUE
26862#define RHASH_LEV_MASK (FL_USER13 | FL_USER14 | FL_USER15 | FL_USER16 | FL_USER17 | FL_USER18 | FL_USER19)
26863#define RHASH(obj) ((struct RHash *)(obj))
26864#pragma GCC visibility push(default)
26865#pragma GCC visibility pop
26866#pragma GCC visibility push(default)
26867#define RHASH_TBL_RAW(h) rb_hash_tbl_raw(h, __FILE__, __LINE__)
26868#pragma GCC visibility pop
26869#define INTERNAL_NUMERIC_H
26870#define INTERNAL_BIGNUM_H
26871#define BDIGIT unsigned int
26872#define SIZEOF_BDIGIT SIZEOF_INT
26873#define BDIGIT_DBL unsigned LONG_LONG
26874#define BDIGIT_DBL_SIGNED LONG_LONG
26875#define PRI_BDIGIT_PREFIX ""
26876#define PRI_BDIGIT_DBL_PREFIX PRI_LL_PREFIX
26877#define SIZEOF_ACTUAL_BDIGIT SIZEOF_BDIGIT
26878#define PRIdBDIGIT PRI_BDIGIT_PREFIX"d"
26879#define PRIiBDIGIT PRI_BDIGIT_PREFIX"i"
26880#define PRIoBDIGIT PRI_BDIGIT_PREFIX"o"
26881#define PRIuBDIGIT PRI_BDIGIT_PREFIX"u"
26882#define PRIxBDIGIT PRI_BDIGIT_PREFIX"x"
26883#define PRIXBDIGIT PRI_BDIGIT_PREFIX"X"
26884#define PRIdBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"d"
26885#define PRIiBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"i"
26886#define PRIoBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"o"
26887#define PRIuBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"u"
26888#define PRIxBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"x"
26889#define PRIXBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"X"
26890#define RBIGNUM(obj) ((struct RBignum *)(obj))
26891#define BIGNUM_SIGN_BIT FL_USER1
26892#define BIGNUM_EMBED_FLAG ((VALUE)FL_USER2)
26893#define BIGNUM_EMBED_LEN_NUMBITS 3
26894#define BIGNUM_EMBED_LEN_MASK (~(~(VALUE)0U << BIGNUM_EMBED_LEN_NUMBITS) << BIGNUM_EMBED_LEN_SHIFT)
26895#define BIGNUM_EMBED_LEN_SHIFT (FL_USHIFT+3)
26896#define BIGNUM_EMBED_LEN_MAX (SIZEOF_VALUE*RBIMPL_RVALUE_EMBED_LEN_MAX/SIZEOF_ACTUAL_BDIGIT)
26897#pragma GCC visibility push(default)
26898#pragma GCC visibility pop
26899#pragma GCC visibility push(default)
26900#pragma GCC visibility pop
26901#define INTERNAL_BITS_H
26902#define HALF_LONG_MSB ((SIGNED_VALUE)1<<((SIZEOF_LONG*CHAR_BIT-1)/2))
26903#define SIGNED_INTEGER_TYPE_P(T) (0 > ((T)0)-1)
26904#define SIGNED_INTEGER_MIN(T) ((sizeof(T) == sizeof(int8_t)) ? ((T)INT8_MIN) : ((sizeof(T) == sizeof(int16_t)) ? ((T)INT16_MIN) : ((sizeof(T) == sizeof(int32_t)) ? ((T)INT32_MIN) : ((sizeof(T) == sizeof(int64_t)) ? ((T)INT64_MIN) : 0))))
26905#define SIGNED_INTEGER_MAX(T) ((T)(SIGNED_INTEGER_MIN(T) ^ ((T)~(T)0)))
26906#define UNSIGNED_INTEGER_MAX(T) ((T)~(T)0)
26907#define MUL_OVERFLOW_P(a,b) __builtin_mul_overflow_p((a), (b), (__typeof__(a * b))0)
26908#define MUL_OVERFLOW_SIGNED_INTEGER_P(a,b,min,max) ( (a) == 0 ? 0 : (a) == -1 ? (b) < -(max) : (a) > 0 ? ((b) > 0 ? (max) / (a) < (b) : (min) / (a) > (b)) : ((b) > 0 ? (min) / (a) < (b) : (max) / (a) > (b)))
26909#define MUL_OVERFLOW_FIXNUM_P(a,b) __extension__ ({ struct { long fixnum : sizeof(long) * CHAR_BIT - 1; } c = { 0 }; __builtin_mul_overflow_p((a), (b), c.fixnum); })
26910#define MUL_OVERFLOW_LONG_LONG_P(a,b) MUL_OVERFLOW_P(a, b)
26911#define MUL_OVERFLOW_LONG_P(a,b) MUL_OVERFLOW_P(a, b)
26912#define MUL_OVERFLOW_INT_P(a,b) MUL_OVERFLOW_P(a, b)
26913#define bit_length(x) (unsigned int) (sizeof(x) <= sizeof(int32_t) ? 32 - nlz_int32((uint32_t)(x)) : sizeof(x) <= sizeof(int64_t) ? 64 - nlz_int64((uint64_t)(x)) : 128 - nlz_int128((uint128_t)(x)))
26914#define swap16 ruby_swap16
26915#define swap32 ruby_swap32
26916#define swap64 ruby_swap64
26917#define INTERNAL_FIXNUM_H
26918#define DLONG int128_t
26919#define DL2NUM(x) (RB_FIXABLE(x) ? LONG2FIX(x) : rb_int128t2big(x))
26920#define ROUND_TO(mode,even,up,down) ((mode) == RUBY_NUM_ROUND_HALF_EVEN ? even : (mode) == RUBY_NUM_ROUND_HALF_UP ? up : down)
26921#define ROUND_FUNC(mode,name) ROUND_TO(mode, name ##_half_even, name ##_half_up, name ##_half_down)
26922#define ROUND_CALL(mode,name,args) ROUND_TO(mode, name ##_half_even args, name ##_half_up args, name ##_half_down args)
26923#define ROUND_DEFAULT RUBY_NUM_ROUND_HALF_UP
26924#define RFLOAT(obj) ((struct RFloat *)(obj))
26925#define rb_float_value rb_float_value_inline
26926#define rb_float_new rb_float_new_inline
26927#pragma GCC visibility push(default)
26928#pragma GCC visibility pop
26929#pragma GCC visibility push(default)
26930#pragma GCC visibility pop
26931#define INTERNAL_RANDOM_H
26932#define INTERNAL_VARIABLE_H
26933#define ROBJECT_TRANSIENT_FLAG FL_USER13
26934#pragma GCC visibility push(default)
26935#pragma GCC visibility pop
26936#pragma GCC visibility push(default)
26937#pragma GCC visibility pop
26938#define INTERNAL_STRUCT_H
26939#define RSTRUCT(obj) ((struct RStruct *)(obj))
26940#define RSTRUCT_LEN internal_RSTRUCT_LEN
26941#define RSTRUCT_SET internal_RSTRUCT_SET
26942#define RSTRUCT_GET internal_RSTRUCT_GET
26943#pragma GCC diagnostic push
26944#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
26945#pragma GCC diagnostic pop
26946#define RUBY_TOPLEVEL_VARIABLE_H
26947#define BIN(n) YARVINSN_ ##n
26948#define ASSERT_VM_INSTRUCTION_SIZE(array) STATIC_ASSERT(numberof_ ##array, numberof(array) == VM_INSTRUCTION_SIZE)
26949#define vm_check_canary(ec,sp)
26950#define vm_check_frame(a,b,c,d)
26951#define vm_push_frame_debug_counter_inc(ec,cfp,t)
26952#pragma GCC diagnostic push
26953#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
26954#pragma GCC diagnostic pop
26955#pragma GCC diagnostic push
26956#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
26957#pragma GCC diagnostic pop
26958#pragma GCC diagnostic push
26959#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
26960#pragma GCC diagnostic pop
26961#pragma GCC diagnostic push
26962#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
26963#pragma GCC diagnostic pop
26964#pragma GCC diagnostic push
26965#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
26966#pragma GCC diagnostic pop
26967#pragma GCC diagnostic push
26968#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
26969#pragma GCC diagnostic pop
26970#pragma GCC diagnostic push
26971#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
26972#pragma GCC diagnostic pop
26973#pragma GCC diagnostic push
26974#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
26975#pragma GCC diagnostic pop
26976#pragma GCC diagnostic push
26977#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
26978#pragma GCC diagnostic pop
26979#pragma GCC diagnostic push
26980#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
26981#pragma GCC diagnostic pop
26982#pragma GCC diagnostic push
26983#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
26984#pragma GCC diagnostic pop
26985#pragma GCC diagnostic push
26986#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
26987#pragma GCC diagnostic pop
26988#define EQ_UNREDEFINED_P(t) BASIC_OP_UNREDEFINED_P(BOP_EQ, t ##_REDEFINED_OP_FLAG)
26989#undef EQ_UNREDEFINED_P
26990#define CHECK_CMP_NAN(a,b)
26991#define KW_SPECIFIED_BITS_MAX (32-1)
26992#define USE_OPT_HIST 0
26993#define CHECK_CFP_CONSISTENCY(func) (LIKELY(vm_cfp_consistent_p(ec, reg_cfp)) ? (void)0 : rb_bug(func ": cfp consistency error (%p, %p)", (void *)reg_cfp, (void *)(ec->cfp+1)))
26994#pragma GCC diagnostic push
26995#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
26996#pragma GCC diagnostic pop
26997#pragma GCC diagnostic push
26998#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
26999#pragma GCC diagnostic pop
27000#define VM_CALL_METHOD_ATTR(var,func,nohook) if (UNLIKELY(ruby_vm_event_flags & (RUBY_EVENT_C_CALL | RUBY_EVENT_C_RETURN))) { EXEC_EVENT_HOOK(ec, RUBY_EVENT_C_CALL, calling->recv, vm_cc_cme(cc)->def->original_id, vm_ci_mid(ci), vm_cc_cme(cc)->owner, Qundef); var = func; EXEC_EVENT_HOOK(ec, RUBY_EVENT_C_RETURN, calling->recv, vm_cc_cme(cc)->def->original_id, vm_ci_mid(ci), vm_cc_cme(cc)->owner, (var)); } else { nohook; var = func; }
27001#pragma GCC diagnostic push
27002#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
27003#pragma GCC diagnostic pop
27004#pragma GCC diagnostic push
27005#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
27006#pragma GCC diagnostic pop
27007#define mexp_search_method vm_search_method_wrap
27008#define mexp_search_super vm_search_super_method
27009#define mexp_search_invokeblock vm_search_invokeblock
27010#define id_cmp idCmp
27011#undef id_cmp
27012#define IMEMO_CONST_CACHE_SHAREABLE IMEMO_FL_USER0
27013#pragma GCC diagnostic push
27014#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
27015#pragma GCC diagnostic pop
27016#pragma GCC diagnostic push
27017#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
27018#pragma GCC diagnostic pop
27019#pragma GCC diagnostic push
27020#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
27021#pragma GCC diagnostic pop
27022#define VM_TRACE_HOOK(target_event,val) do { if ((pc_events & (target_event)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (target_event), global_hooks, local_hooks_ptr, (val)); } } while (0)
27023#undef VM_TRACE_HOOK
27024#define id_mesg idMesg
static VALUE RB_CHR2FIX(unsigned char c)
Converts a C's unsigned char into an instance of rb_cInteger.
Definition: char.h:56
static char rb_num2char_inline(VALUE x)
Converts an instance of rb_cNumeric into C's char.
Definition: char.h:73
static int rb_isdigit(int c)
Our own locale-insensitive version of isdigit(3).
Definition: ctype.h:302
static int rb_isupper(int c)
Our own locale-insensitive version of isupper(3).
Definition: ctype.h:232
static int rb_iscntrl(int c)
Our own locale-insensitive version of iscntrl(3).
Definition: ctype.h:418
static int rb_ispunct(int c)
Our own locale-insensitive version of ispunct(3).
Definition: ctype.h:465
static int rb_isalnum(int c)
Our own locale-insensitive version of isalnum(3).
Definition: ctype.h:326
static int rb_isxdigit(int c)
Our own locale-insensitive version of isxdigit(3).
Definition: ctype.h:349
static int rb_isspace(int c)
Our own locale-insensitive version of isspace(3).
Definition: ctype.h:395
static int rb_isascii(int c)
Our own locale-insensitive version of isascii(3).
Definition: ctype.h:209
static int rb_toupper(int c)
Our own locale-insensitive version of toupper(3).
Definition: ctype.h:539
unsigned long ruby_strtoul(const char *str, char **endptr, int base)
Our own locale-insensitive version of strtoul(3).
Definition: util.c:133
static int rb_tolower(int c)
Our own locale-insensitive version of tolower(3).
Definition: ctype.h:514
static int rb_isgraph(int c)
Our own locale-insensitive version of isgraph(3).
Definition: ctype.h:489
static int rb_isalpha(int c)
Our own locale-insensitive version of isalpha(3).
Definition: ctype.h:279
static int rb_islower(int c)
Our own locale-insensitive version of islower(3).
Definition: ctype.h:255
static int rb_isprint(int c)
Identical to rb_isgraph(), except it also returns true for ‘’ '`.
Definition: ctype.h:442
static int rb_isblank(int c)
Our own locale-insensitive version of isblank(3).
Definition: ctype.h:372
#define rb_define_method_id(klass, mid, func, arity)
Defines klass#mid.
Definition: cxxanyargs.hpp:673
#define rb_define_singleton_method(klass, mid, func, arity)
Defines klass.mid.
Definition: cxxanyargs.hpp:685
#define rb_define_protected_method(klass, mid, func, arity)
Defines klass#mid and makes it protected.
Definition: cxxanyargs.hpp:681
#define rb_define_private_method(klass, mid, func, arity)
Defines klass#mid and makes it private.
Definition: cxxanyargs.hpp:677
double rb_float_value(VALUE num)
Extracts its double value from an instance of rb_cFloat.
Definition: numeric.c:6418
VALUE rb_float_new_in_heap(double d)
Identical to rb_float_new(), except it does not generate Flonums.
Definition: numeric.c:1014
VALUE rb_float_new(double d)
Converts a C's double into an instance of rb_cFloat.
Definition: numeric.c:6425
void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data)
Registers an event hook function.
Definition: vm_trace.c:186
int rb_remove_event_hook(rb_event_hook_func_t func)
Removes the passed function from the list of event hooks.
Definition: vm_trace.c:294
void(* rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass)
Type of event hooks.
Definition: event.h:115
ruby_fl_ushift
This is an enum because GDB wants it (rather than a macro).
Definition: fl_type.h:162
@ RUBY_FL_USHIFT
Number of bits in ruby_fl_type that are not open to users.
Definition: fl_type.h:167
static VALUE RB_OBJ_FROZEN_RAW(VALUE obj)
This is an implenentation detail of RB_OBJ_FROZEN().
Definition: fl_type.h:906
static bool RB_OBJ_TAINTABLE(VALUE obj)
Definition: fl_type.h:788
static VALUE RB_FL_TEST(VALUE obj, VALUE flags)
Tests if the given flag(s) are set or not.
Definition: fl_type.h:527
static VALUE RB_FL_TEST_RAW(VALUE obj, VALUE flags)
This is an implenentation detail of RB_FL_TEST().
Definition: fl_type.h:501
static bool RB_FL_ABLE(VALUE obj)
Checks if the object is flaggable.
Definition: fl_type.h:476
static bool RB_FL_ANY_RAW(VALUE obj, VALUE flags)
This is an implenentation detail of RB_FL_ANY().
Definition: fl_type.h:550
static void rb_obj_freeze_inline(VALUE x)
Prevents further modifications to the given object.
Definition: fl_type.h:951
static bool RB_FL_ANY(VALUE obj, VALUE flags)
Identical to RB_FL_TEST(), except it returns bool.
Definition: fl_type.h:566
static void RB_FL_SET_RAW(VALUE obj, VALUE flags)
This is an implenentation detail of RB_FL_SET().
Definition: fl_type.h:638
static bool RB_FL_ALL(VALUE obj, VALUE flags)
Identical to RB_FL_ANY(), except it mandates all passed flags be set.
Definition: fl_type.h:600
static bool RB_OBJ_FROZEN(VALUE obj)
Checks if an object is frozen.
Definition: fl_type.h:921
static bool RB_OBJ_TAINTED(VALUE obj)
Definition: fl_type.h:822
static VALUE RB_OBJ_TAINTED_RAW(VALUE obj)
Definition: fl_type.h:805
static void RB_OBJ_INFECT(VALUE dst, VALUE src)
Definition: fl_type.h:884
static void RB_FL_UNSET_RAW(VALUE obj, VALUE flags)
This is an implenentation detail of RB_FL_UNSET().
Definition: fl_type.h:698
@ RUBY_FL_DUPPED
Definition: fl_type.h:439
static void RB_FL_SET(VALUE obj, VALUE flags)
Sets the given flag(s).
Definition: fl_type.h:658
static void RB_OBJ_INFECT_RAW(VALUE dst, VALUE src)
Definition: fl_type.h:868
static void RB_FL_REVERSE(VALUE obj, VALUE flags)
Reverses the flags.
Definition: fl_type.h:769
static void RB_FL_UNSET(VALUE obj, VALUE flags)
Clears the given flag(s).
Definition: fl_type.h:713
static void RB_OBJ_FREEZE_RAW(VALUE obj)
This is an implenentation detail of RB_OBJ_FREEZE().
Definition: fl_type.h:939
static void RB_FL_REVERSE_RAW(VALUE obj, VALUE flags)
This is an implenentation detail of RB_FL_REVERSE().
Definition: fl_type.h:753
static bool RB_FL_ALL_RAW(VALUE obj, VALUE flags)
This is an implenentation detail of RB_FL_ALL().
Definition: fl_type.h:584
@ RUBY_FL_PROMOTED1
This flag has something to do with our garbage collector.
Definition: fl_type.h:240
@ RUBY_ELTS_SHARED
This flag has something to do with data structures.
Definition: fl_type.h:405
@ RUBY_FL_USER9
User-defined flag.
Definition: fl_type.h:369
@ RUBY_FL_SINGLETON
This flag has something to do with an object's class.
Definition: fl_type.h:430
@ RUBY_FL_USER8
User-defined flag.
Definition: fl_type.h:368
@ RUBY_FL_USER11
User-defined flag.
Definition: fl_type.h:371
@ RUBY_FL_USER5
User-defined flag.
Definition: fl_type.h:365
@ RUBY_FL_TAINT
Definition: fl_type.h:278
@ RUBY_FL_USER3
User-defined flag.
Definition: fl_type.h:363
@ RUBY_FL_USER17
User-defined flag.
Definition: fl_type.h:377
@ RUBY_FL_USER10
User-defined flag.
Definition: fl_type.h:370
@ RUBY_FL_USER7
User-defined flag.
Definition: fl_type.h:367
@ RUBY_FL_WB_PROTECTED
Definition: fl_type.h:207
@ RUBY_FL_PROMOTED0
This flag has something to do with our garbage collector.
Definition: fl_type.h:223
@ RUBY_FL_USER14
User-defined flag.
Definition: fl_type.h:374
@ RUBY_FL_USER6
User-defined flag.
Definition: fl_type.h:366
@ RUBY_FL_USER16
User-defined flag.
Definition: fl_type.h:376
@ RUBY_FL_EXIVAR
This flag has something to do with instance variables.
Definition: fl_type.h:345
@ RUBY_FL_UNTRUSTED
Definition: fl_type.h:305
@ RUBY_FL_PROMOTED
This flag has something to do with our garbage collector.
Definition: fl_type.h:257
@ RUBY_FL_USER0
User-defined flag.
Definition: fl_type.h:360
@ RUBY_FL_FREEZE
This flag has something to do with data immutability.
Definition: fl_type.h:356
@ RUBY_FL_USER15
User-defined flag.
Definition: fl_type.h:375
@ RUBY_FL_SEEN_OBJ_ID
This flag has something to do with object IDs.
Definition: fl_type.h:332
@ RUBY_FL_USER2
User-defined flag.
Definition: fl_type.h:362
@ RUBY_FL_USER4
User-defined flag.
Definition: fl_type.h:364
@ RUBY_FL_USER18
User-defined flag.
Definition: fl_type.h:378
@ RUBY_FL_USER1
User-defined flag.
Definition: fl_type.h:361
@ RUBY_FL_SHAREABLE
This flag has something to do with Ractor.
Definition: fl_type.h:298
@ RUBY_FL_FINALIZE
This flag has something to do with finalisers.
Definition: fl_type.h:271
@ RUBY_FL_USER19
User-defined flag.
Definition: fl_type.h:380
@ RUBY_FL_USER13
User-defined flag.
Definition: fl_type.h:373
@ RUBY_FL_USER12
User-defined flag.
Definition: fl_type.h:372
static void RB_OBJ_TAINT_RAW(VALUE obj)
Definition: fl_type.h:837
static void RB_OBJ_TAINT(VALUE obj)
Definition: fl_type.h:852
int ruby_glob(const char *pattern, int flags, ruby_glob_func *func, VALUE arg)
Identical to rb_glob(), except it returns opaque exception states instead of raising exceptions.
Definition: dir.c:2703
void rb_glob(const char *pattern, void(*func)(const char *path, VALUE arg, void *enc), VALUE arg)
The "glob" operator.
int ruby_brace_glob(const char *pattern, int flags, ruby_glob_func *func, VALUE arg)
Identical to ruby_glob(), @shyouhei currently suspects.
Definition: dir.c:2843
int ruby_glob_func(const char *path, VALUE arg, void *enc)
Type of a glob callback function.
Definition: glob.h:49
void rb_include_module(VALUE klass, VALUE module)
Includes a module to a class.
Definition: class.c:1101
VALUE rb_define_class(const char *, VALUE)
Defines a top-level class.
Definition: class.c:896
void rb_extend_object(VALUE obj, VALUE module)
Extend the object with the module.
Definition: eval.c:1676
void rb_prepend_module(VALUE klass, VALUE module)
Identical to rb_include_module(), except it "prepends" the passed module to the klass,...
Definition: class.c:1356
VALUE rb_define_class_under(VALUE, const char *, VALUE)
Defines a class under the namespace of outer.
Definition: class.c:928
VALUE rb_define_module(const char *)
Defines a top-level module.
Definition: class.c:1006
VALUE rb_define_module_under(VALUE, const char *)
Defines a module under the namespace of outer.
Definition: class.c:1030
void rb_define_alias(VALUE, const char *, const char *)
Defines an alias of a method.
Definition: class.c:2208
void rb_define_module_function(VALUE module, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a module function for a module.
Definition: class.c:2192
void rb_need_block(void)
Declares that the current method needs a block.
Definition: eval.c:872
void rb_define_attr(VALUE, const char *, int, int)
Defines public accessor method(s) for an attribute.
Definition: class.c:2214
void rb_undef_method(VALUE, const char *)
Defines an undef of a method.
Definition: class.c:2030
void rb_define_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a method.
Definition: class.c:2006
int rb_keyword_given_p(void)
Determines if the current method is given a keyword argument.
Definition: eval.c:864
int rb_block_given_p(void)
Determines if the current method is given a block.
Definition: eval.c:851
void rb_define_global_function(const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a global function.
Definition: class.c:2202
void ruby_stop(int ex)
Calls ruby_cleanup() and exits the process.
Definition: eval.c:289
int ruby_exec_node(void *n)
Identical to ruby_run_node(), except it returns an opaque execution status.
Definition: eval.c:325
int ruby_setup(void)
Initializes the VM and builtin libraries.
Definition: eval.c:65
void ruby_finalize(void)
Runs the VM finalization processes.
Definition: eval.c:168
void ruby_init_stack(volatile VALUE *addr)
Set stack bottom of Ruby implementation.
void ruby_script(const char *name)
Sets the current script name to this value.
Definition: ruby.c:2495
void ruby_set_argv(int argc, char **argv)
Sets argv that ruby understands.
Definition: ruby.c:2610
void ruby_set_script_name(VALUE name)
Identical to ruby_script(), except it takes the name as a Ruby String instance.
Definition: ruby.c:2508
int ruby_cleanup(int ex)
Destructs the VM.
Definition: eval.c:176
size_t ruby_stack_length(VALUE **p)
Queries what Ruby thinks is the machine stack.
Definition: gc.c:6248
int ruby_stack_check(void)
Checks for stack overflow.
Definition: gc.c:6288
void ruby_init_loadpath(void)
Sets up $LOAD_PATH.
Definition: ruby.c:619
void * ruby_process_options(int argc, char **argv)
Identical to ruby_options(), except it raises ruby-level exceptions on failure.
Definition: ruby.c:2625
void ruby_prog_init(void)
Defines built-in variables.
Definition: ruby.c:2578
void ruby_sig_finalize(void)
Clear signal handlers.
Definition: signal.c:1497
void ruby_incpush(const char *path)
Appends the given path to the end of the load path.
Definition: ruby.c:458
void rb_notimplement(void)
Definition: error.c:3144
void rb_mod_sys_fail(VALUE mod, const char *mesg)
Identical to rb_sys_fail(), except it takes additional module to extend the exception object before r...
Definition: error.c:3280
rb_warning_category_t
Warning categories.
Definition: error.h:43
VALUE rb_eLocalJumpError
LocalJumpError exception.
Definition: eval.c:48
void rb_category_warn(rb_warning_category_t cat, const char *fmt,...)
Identical to rb_category_warning(), except it reports always regardless of runtime -W flag.
Definition: error.c:429
void rb_raise(VALUE exc, const char *fmt,...)
Exception entry point.
Definition: error.c:3101
void rb_compile_warn(const char *file, int line, const char *fmt,...)
Identical to rb_compile_warning(), except it reports always regardless of runtime -W flag.
Definition: error.c:361
void rb_category_warning(rb_warning_category_t cat, const char *fmt,...)
Identical to rb_warning(), except it takes additional "category" parameter.
Definition: error.c:461
void rb_mod_syserr_fail(VALUE mod, int e, const char *mesg)
Identical to rb_mod_sys_fail(), except it does not depend on C global variable errno.
Definition: error.c:3294
VALUE rb_rescue2(VALUE(*b_proc)(VALUE), VALUE data1, VALUE(*r_proc)(VALUE, VALUE), VALUE data2,...)
An equivalent of rescue clause.
Definition: eval.c:880
void rb_syserr_fail(int e, const char *mesg)
Raises appropriate exception that represents a C errno.
Definition: error.c:3213
void rb_bug(const char *fmt,...)
Interpreter panic switch.
Definition: error.c:803
void rb_iter_break(void)
Breaks from a block.
Definition: vm.c:1822
void rb_sys_fail(const char *mesg)
Converts a C errno into a Ruby exception, then raises it.
Definition: error.c:3225
VALUE rb_eZeroDivError
ZeroDivisionError exception.
Definition: numeric.c:194
void rb_readwrite_syserr_fail(enum rb_io_wait_readwrite waiting, int err, const char *msg)
Identical to rb_readwrite_sys_fail(), except it does not depend on C global variable errno.
Definition: io.c:14003
void rb_sys_warning(const char *fmt,...)
Identical to rb_sys_fail(), except it does not raise an exception to render a warning instead.
Definition: error.c:3362
VALUE rb_eIOError
IOError exception.
Definition: io.c:188
VALUE rb_syserr_new_str(int n, VALUE arg)
Identical to rb_syserr_new(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3207
void rb_mod_syserr_fail_str(VALUE mod, int e, VALUE mesg)
Identical to rb_mod_syserr_fail(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3301
void rb_set_errinfo(VALUE err)
Sets the current exception ($!) to the given value.
Definition: eval.c:1861
VALUE rb_eRegexpError
RegexpError exception.
Definition: re.c:30
void rb_syserr_fail_str(int e, VALUE mesg)
Identical to rb_syserr_fail(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3219
VALUE rb_eEOFError
EOFError exception.
Definition: io.c:187
VALUE rb_vrescue2(VALUE(*b_proc)(VALUE), VALUE data1, VALUE(*r_proc)(VALUE, VALUE), VALUE data2, va_list args)
Identical to rb_rescue2(), except it takes va_list instead of variadic number of arguments.
Definition: eval.c:891
void rb_fatal(const char *fmt,...)
Raises the unsung "fatal" exception.
Definition: error.c:3152
void rb_readwrite_sys_fail(enum rb_io_wait_readwrite waiting, const char *msg)
Raises appropriate exception using the parameters.
Definition: io.c:13997
void rb_iter_break_value(VALUE val)
Identical to rb_iter_break(), except it additionally takes the "value" of this breakage.
Definition: vm.c:1828
void rb_category_compile_warn(rb_warning_category_t cat, const char *file, int line, const char *fmt,...)
Identical to rb_compile_warn(), except it also accepts category.
Definition: error.c:390
VALUE * rb_ruby_verbose_ptr(void)
This is an implementation detail of ruby_verbose.
Definition: vm.c:4011
VALUE rb_eStopIteration
StopIteration exception.
Definition: enumerator.c:141
VALUE rb_eFloatDomainError
FloatDomainError exception.
Definition: numeric.c:195
void rb_warn(const char *fmt,...)
Identical to rb_warning(), except it reports always regardless of runtime -W flag.
Definition: error.c:419
void rb_bug_errno(const char *mesg, int errno_arg)
This is a wrapper of rb_bug() which automatically constructs appropriate message from the passed errn...
Definition: error.c:831
void rb_compile_warning(const char *file, int line, const char *fmt,...)
Issues a compile-time warning that happens at __file__:__line__.
Definition: error.c:376
VALUE rb_rescue(VALUE(*b_proc)(VALUE), VALUE data1, VALUE(*r_proc)(VALUE, VALUE), VALUE data2)
Identical to rb_rescue2(), except it does not take a list of exception classes.
Definition: eval.c:951
VALUE * rb_ruby_debug_ptr(void)
This is an implementation detail of ruby_debug.
Definition: vm.c:4018
VALUE rb_ensure(VALUE(*b_proc)(VALUE), VALUE data1, VALUE(*e_proc)(VALUE), VALUE data2)
An equivalent to ensure clause.
Definition: eval.c:980
VALUE rb_errinfo(void)
This is the same as $! in Ruby.
Definition: eval.c:1855
VALUE rb_eSysStackError
SystemStackError exception.
Definition: eval.c:49
VALUE rb_syserr_new(int err, const char *msg)
Creates an exception object that represents the given C errno.
Definition: error.c:3199
void rb_sys_fail_str(VALUE mesg)
Identical to rb_sys_fail(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3231
void rb_unexpected_type(VALUE x, int t)
Fails with the given object's type incompatibility to the type.
Definition: error.c:1030
void rb_mod_sys_fail_str(VALUE mod, VALUE mesg)
Identical to rb_mod_sys_fail(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3287
VALUE rb_eThreadError
ThreadError exception.
Definition: eval.c:869
void rb_exit(int status)
Terminates the current execution context.
Definition: process.c:4503
VALUE rb_eMathDomainError
Math::DomainError exception.
Definition: math.c:30
void rb_check_type(VALUE x, int t)
This was the old implementation of Check_Type(), but they diverged.
Definition: error.c:1007
void rb_warning(const char *fmt,...)
Issues a warning.
Definition: error.c:450
@ RB_WARN_CATEGORY_DEPRECATED
Warning is for deprecated features.
Definition: error.h:48
@ RB_WARN_CATEGORY_EXPERIMENTAL
Warning is for experimental features.
Definition: error.h:51
@ RB_WARN_CATEGORY_NONE
Category unspecified.
Definition: error.h:45
VALUE rb_cRational
Rational class.
Definition: rational.c:47
VALUE rb_cUnboundMethod
UnboundMethod class.
Definition: proc.c:46
VALUE rb_cTime
Time class.
Definition: time.c:647
VALUE rb_cDir
Dir class.
Definition: dir.c:458
VALUE rb_cComplex
Complex class.
Definition: complex.c:38
VALUE rb_cArray
Array class.
Definition: array.c:40
VALUE rb_mProcess
Process module.
Definition: process.c:8764
VALUE rb_mMath
Math module.
Definition: math.c:29
VALUE rb_cIO
IO class.
Definition: io.c:186
VALUE rb_mEnumerable
Enumerable module.
Definition: enum.c:27
VALUE rb_cMatch
MatchData class.
Definition: re.c:956
VALUE rb_cStruct
Struct class.
Definition: struct.c:31
VALUE rb_cEnumerator
Enumerator class.
Definition: enumerator.c:126
VALUE rb_cInteger
Module class.
Definition: numeric.c:192
VALUE rb_stdin
STDIN constant.
Definition: io.c:199
VALUE rb_cStat
File::Stat class.
Definition: file.c:176
VALUE rb_cBinding
Binding class.
Definition: proc.c:48
VALUE rb_cRegexp
Regexp class.
Definition: re.c:2459
VALUE rb_mGC
GC module.
Definition: gc.c:1151
VALUE rb_cHash
Hash class.
Definition: hash.c:92
VALUE rb_stderr
STDERR constant.
VALUE rb_cNumeric
Numeric class.
Definition: numeric.c:190
static VALUE rb_class_of(VALUE obj)
Object to class mapping function.
Definition: globals.h:172
VALUE rb_cRandom
Random class.
Definition: random.c:229
VALUE rb_cEncoding
Encoding class.
Definition: encoding.c:57
VALUE rb_cSymbol
Sumbol class.
Definition: string.c:80
VALUE rb_cThread
Thread class.
Definition: vm.c:401
VALUE rb_cRange
Range class.
Definition: range.c:31
VALUE rb_mFileTest
FileTest module.
Definition: file.c:175
VALUE rb_mWaitReadable
IO::WaitReadable module.
Definition: io.c:189
VALUE rb_mWaitWritable
IO::WaitReadable module.
Definition: io.c:190
VALUE rb_mComparable
Comparable module.
Definition: compar.c:19
VALUE rb_cFloat
Float class.
Definition: numeric.c:191
VALUE rb_cProc
Proc class.
Definition: proc.c:49
VALUE rb_cFile
File class.
Definition: file.c:174
VALUE rb_stdout
STDOUT constant.
VALUE rb_cString
String class.
Definition: string.c:79
VALUE rb_cMethod
Method class.
Definition: proc.c:47
int ruby_run_node(void *n)
Runs the given compiled source and exits this process.
Definition: eval.c:312
void ruby_init(void)
Calls ruby_setup() and check error.
Definition: eval.c:98
void * ruby_options(int argc, char **argv)
Processes command line arguments and compiles the Ruby source to execute.
Definition: eval.c:109
void ruby_show_copyright(void)
Prints the copyright notice of the CRuby interpreter to stdout.
Definition: version.c:145
void ruby_sysinit(int *argc, char ***argv)
Initializes the process for libruby.
Definition: ruby.c:2678
void ruby_show_version(void)
Prints the version information of the CRuby interpreter to stdout.
Definition: version.c:123
int ruby_executable_node(void *n, int *status)
Checks the return value of ruby_options().
Definition: eval.c:295
VALUE rb_eval_string_wrap(const char *str, int *state)
Identical to rb_eval_string_protect(), except it evaluates the given string under a module binding in...
Definition: vm_eval.c:1868
VALUE rb_funcall_passing_block(VALUE recv, ID mid, int argc, const VALUE *argv)
Identical to rb_funcallv_public(), except you can pass the passed block.
Definition: vm_eval.c:1165
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition: vm_eval.c:1102
VALUE rb_funcallv_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
Identical to rb_funcallv(), except you can specify how to handle the last element of the given array.
Definition: vm_eval.c:1069
VALUE rb_funcallv(VALUE recv, ID mid, int argc, const VALUE *argv)
Identical to rb_funcall(), except it takes the method arguments as a C array.
Definition: vm_eval.c:1061
VALUE rb_funcall_with_block(VALUE recv, ID mid, int argc, const VALUE *argv, VALUE procval)
Identical to rb_funcallv_public(), except you can pass a block.
Definition: vm_eval.c:1179
VALUE rb_eval_string_protect(const char *str, int *state)
Identical to rb_eval_string(), except it avoids potential global escapes.
Definition: vm_eval.c:1847
VALUE rb_call_super_kw(int argc, const VALUE *argv, int kw_splat)
Identical to rb_call_super(), except you can specify how to handle the last element of the given arra...
Definition: vm_eval.c:330
VALUE rb_funcallv_public(VALUE recv, ID mid, int argc, const VALUE *argv)
Identical to rb_funcallv(), except it only takes public methods into account.
Definition: vm_eval.c:1153
VALUE rb_current_receiver(void)
This resembles ruby's self.
Definition: vm_eval.c:344
VALUE rb_funcall_passing_block_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
Identical to rb_funcallv_passing_block(), except you can specify how to handle the last element of th...
Definition: vm_eval.c:1172
VALUE rb_funcall_with_block_kw(VALUE recv, ID mid, int argc, const VALUE *argv, VALUE procval, int kw_splat)
Identical to rb_funcallv_with_block(), except you can specify how to handle the last element of the g...
Definition: vm_eval.c:1189
VALUE rb_eval_string(const char *str)
Evaluates the given string in an isolated binding.
Definition: vm_eval.c:1835
VALUE rb_call_super(int argc, const VALUE *argv)
This resembles ruby's super.
Definition: vm_eval.c:338
VALUE rb_funcallv_public_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
Identical to rb_funcallv_public(), except you can specify how to handle the last element of the given...
Definition: vm_eval.c:1159
void rb_gc_register_address(VALUE *valptr)
Inform the garbage collector that valptr points to a live Ruby object that should not be moved.
Definition: gc.c:8969
void rb_gc_unregister_address(VALUE *valptr)
Inform the garbage collector that a pointer previously passed to rb_gc_register_address() no longer p...
Definition: gc.c:8981
void rb_gc_register_mark_object(VALUE object)
Inform the garbage collector that object is a live Ruby object that should not be moved.
Definition: gc.c:8948
void rb_undef(VALUE mod, ID mid)
Inserts a method entry that hides previous method definition of the given name.
Definition: vm_method.c:1751
VALUE rb_class_descendants(VALUE klass)
Queries the class's descendants.
int rb_respond_to(VALUE obj, ID mid)
Queries if the object responds to the method.
Definition: vm_method.c:2799
VALUE(* rb_alloc_func_t)(VALUE klass)
This is the type of functions that ruby calls when trying to allocate an object.
Definition: vm.h:216
void rb_undef_alloc_func(VALUE klass)
Deletes the allocator function of a class.
Definition: vm_method.c:1151
const char * rb_sourcefile(void)
Resembles __FILE__.
Definition: vm.c:1609
void rb_alias(VALUE klass, ID dst, ID src)
Resembles alias.
Definition: vm_method.c:2134
int rb_method_basic_definition_p(VALUE klass, ID mid)
Well... Let us hesitate from describing what a "basic definition" is.
Definition: vm_method.c:2677
void rb_attr(VALUE klass, ID name, int need_reader, int need_writer, int honour_visibility)
This function resembles now-deprecated Module#attr.
Definition: vm_method.c:1714
void rb_remove_method(VALUE klass, const char *name)
Removes a method.
Definition: vm_method.c:1563
VALUE rb_check_funcall(VALUE recv, ID mid, int argc, const VALUE *argv)
Identical to rb_funcallv(), except it returns RUBY_Qundef instead of raising rb_eNoMethodError.
Definition: vm_eval.c:664
int rb_frame_method_id_and_class(ID *idp, VALUE *klassp)
Resembles __method__.
Definition: vm.c:2578
rb_alloc_func_t rb_get_alloc_func(VALUE klass)
Queries the allocator function of a class.
Definition: vm_method.c:1157
void rb_clear_constant_cache_for_id(ID id)
Clears the inline constant caches associated with a particular ID.
Definition: vm_method.c:140
VALUE rb_check_funcall_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
Identical to rb_check_funcall(), except you can specify how to handle the last element of the given a...
Definition: vm_eval.c:658
VALUE rb_mod_module_eval(int argc, const VALUE *argv, VALUE mod)
Identical to rb_obj_instance_eval(), except it evaluates within the context of module.
Definition: vm_eval.c:2138
void rb_remove_method_id(VALUE klass, ID mid)
Identical to rb_remove_method(), except it accepts the method name as ID.
Definition: vm_method.c:1557
VALUE rb_mod_module_exec(int argc, const VALUE *argv, VALUE mod)
Identical to rb_obj_instance_exec(), except it evaluates within the context of module.
Definition: vm_eval.c:2172
void rb_define_alloc_func(VALUE klass, rb_alloc_func_t func)
Sets the allocator function of a class.
VALUE rb_obj_instance_exec(int argc, const VALUE *argv, VALUE recv)
Executes the given block within the context of the receiver.
Definition: vm_eval.c:2099
VALUE rb_eval_cmd_kw(VALUE cmd, VALUE arg, int kw_splat)
This API is practically a variant of rb_proc_call_kw() now.
Definition: vm_eval.c:1900
VALUE rb_f_notimplement(int argc, const VALUE *argv, VALUE obj, VALUE marker)
Raises rb_eNotImpError.
Definition: vm_method.c:360
VALUE rb_apply(VALUE recv, ID mid, VALUE args)
Identical to rb_funcallv(), except it takes Ruby's array instead of C's.
Definition: vm_eval.c:1077
VALUE rb_make_backtrace(void)
Creates the good old fashioned array-of-strings style backtrace info.
int rb_method_boundp(VALUE klass, ID id, int ex)
Queries if the klass has this method.
Definition: vm_method.c:1675
void rb_backtrace(void)
Prints the backtrace out to the standard error.
VALUE rb_obj_instance_eval(int argc, const VALUE *argv, VALUE recv)
Evaluates a string containing Ruby source code, or the given block, within the context of the receive...
Definition: vm_eval.c:2069
int rb_sourceline(void)
Resembles __LINE__.
Definition: vm.c:1623
int rb_obj_respond_to(VALUE obj, ID mid, int private_p)
Identical to rb_respond_to(), except it additionally takes the visibility parameter.
Definition: vm_method.c:2783
#define strtod(s, e)
Just another name of ruby_strtod.
Definition: util.h:212
#define strdup(s)
Just another name of ruby_strdup.
Definition: util.h:176
static unsigned int RB_FIX2UINT(VALUE x)
Converts a Fixnum into C's int.
Definition: int.h:208
unsigned long rb_num2uint(VALUE num)
Converts an instance of rb_cNumeric into C's unsigned long.
Definition: numeric.c:3296
long rb_fix2int(VALUE num)
Identical to rb_num2int().
Definition: numeric.c:3290
static int rb_num2int_inline(VALUE x)
Converts an instance of rb_cNumeric into C's int.
Definition: int.h:158
long rb_num2int(VALUE num)
Converts an instance of rb_cNumeric into C's long.
Definition: numeric.c:3284
static VALUE rb_uint2num_inline(unsigned int v)
Converts a C's unsigned int into an instance of rb_cInteger.
Definition: int.h:254
static int RB_FIX2INT(VALUE x)
Converts a Fixnum into C's int.
Definition: int.h:129
static unsigned int RB_NUM2UINT(VALUE x)
Converts an instance of rb_cNumeric into C's unsigned int.
Definition: int.h:185
static VALUE rb_int2num_inline(int v)
Converts a C's int into an instance of rb_cInteger.
Definition: int.h:239
unsigned long rb_fix2uint(VALUE num)
Identical to rb_num2uint().
Definition: numeric.c:3302
LONG_LONG rb_num2ll(VALUE num)
Converts an instance of rb_cNumeric into C's long long.
unsigned LONG_LONG rb_num2ull(VALUE num)
Converts an instance of rb_cNumeric into C's unsigned long long.
static VALUE rb_ull2num_inline(unsigned LONG_LONG n)
Converts a C's unsigned long long into an instance of rb_cInteger.
Definition: long_long.h:95
VALUE rb_ull2inum(unsigned LONG_LONG num)
Converts a C's unsigned long long into an instance of rb_cInteger.
static VALUE rb_ll2num_inline(LONG_LONG n)
Converts a C's long long into an instance of rb_cInteger.
Definition: long_long.h:82
VALUE rb_ll2inum(LONG_LONG num)
Converts a C's long long into an instance of rb_cInteger.
static LONG_LONG rb_num2ll_inline(VALUE x)
Converts an instance of rb_cNumeric into C's long long.
Definition: long_long.h:110
static unsigned LONG_LONG rb_num2ull_inline(VALUE x)
Converts an instance of rb_cNumeric into C's unsigned long long.
Definition: long_long.h:127
VALUE rb_int2inum(intptr_t i)
Converts a C's intptr_t into an instance of rb_cInteger.
Definition: bignum.c:3237
VALUE rb_uint2big(uintptr_t i)
Converts a C's intptr_t into an instance of rb_cInteger.
Definition: bignum.c:3187
VALUE rb_int2big(intptr_t i)
Converts a C's intptr_t into an instance of rb_cInteger.
Definition: bignum.c:3209
VALUE rb_uint2inum(uintptr_t i)
Converts a C's uintptr_t into an instance of rb_cInteger.
Definition: bignum.c:3230
VALUE rb_catch_obj(VALUE tag, rb_block_call_func_t func, VALUE data)
Identical to rb_catch(), except it catches arbitrary Ruby objects.
Definition: vm_eval.c:2401
VALUE rb_each(VALUE obj)
This is a shorthand of calling obj.each.
Definition: vm_eval.c:1657
VALUE rb_block_call(VALUE obj, ID mid, int argc, const VALUE *argv, rb_block_call_func_t proc, VALUE data2)
Identical to rb_funcallv(), except it additionally passes a function as a block.
Definition: vm_eval.c:1595
VALUE rb_yield_values(int n,...)
Identical to rb_yield(), except it takes variadic number of parameters and pass them to the block.
Definition: vm_eval.c:1369
VALUE rb_yield_splat(VALUE ary)
Identical to rb_yield_values(), except it splats an array to generate the list of parameters.
Definition: vm_eval.c:1403
void rb_throw(const char *tag, VALUE val)
Transfers control to the end of the active catch block waiting for tag.
Definition: vm_eval.c:2289
VALUE rb_yield_values2(int n, const VALUE *argv)
Identical to rb_yield_values(), except it takes the parameters as a C array instead of variadic argum...
Definition: vm_eval.c:1391
VALUE rb_yield(VALUE val)
Yields the block.
Definition: vm_eval.c:1357
VALUE rb_yield_values_kw(int n, const VALUE *argv, int kw_splat)
Identical to rb_yield_values2(), except you can specify how to handle the last element of the given a...
Definition: vm_eval.c:1397
VALUE rb_yield_block(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg))
Pass a passed block.
void rb_throw_obj(VALUE tag, VALUE val)
Identical to rb_throw(), except it allows arbitrary Ruby object to become a tag.
Definition: vm_eval.c:2264
VALUE rb_block_call_func(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg))
This is the type of a function that the interpreter expect for C-backended blocks.
Definition: iterator.h:83
VALUE rb_iterate(VALUE(*func1)(VALUE), VALUE data1, rb_block_call_func_t proc, VALUE data2)
Old way to iterate a block.
Definition: vm_eval.c:1569
VALUE rb_catch(const char *tag, rb_block_call_func_t func, VALUE data)
Executes the passed block and catches values thrown from inside of it.
Definition: vm_eval.c:2359
VALUE rb_block_call_kw(VALUE obj, ID mid, int argc, const VALUE *argv, rb_block_call_func_t proc, VALUE data2, int kw_splat)
Identical to rb_funcallv_kw(), except it additionally passes a function as a block.
Definition: vm_eval.c:1602
VALUE rb_yield_splat_kw(VALUE ary, int kw_splat)
Identical to rb_yield_splat(), except you can specify how to handle the last element of the given arr...
Definition: vm_eval.c:1416
static long rb_num2long_inline(VALUE x)
Converts an instance of rb_cNumeric into C's long.
Definition: long.h:267
static VALUE RB_INT2FIX(long i)
Converts a C's long into an instance of rb_cInteger.
Definition: long.h:111
static unsigned long rb_num2ulong_inline(VALUE x)
Converts an instance of rb_cNumeric into C's unsigned long.
Definition: long.h:293
static int rb_long2int_inline(long n)
Checks if int can hold the given integer.
Definition: long.h:135
static VALUE rb_ulong2num_inline(unsigned long v)
Converts a C's unsigned long into an instance of rb_cInteger.
Definition: long.h:323
static long rb_fix2long(VALUE x)
Converts a Fixnum into C's long.
Definition: long.h:231
void rb_out_of_int(SIGNED_VALUE num)
This is an utility function to raise an rb_eRangeError.
Definition: numeric.c:3211
long rb_num2long(VALUE num)
Converts an instance of rb_cNumeric into C's long.
Definition: numeric.c:3136
unsigned long rb_num2ulong(VALUE num)
Converts an instance of rb_cNumeric into C's unsigned long.
Definition: numeric.c:3205
static VALUE rb_long2num_inline(long v)
Converts a C's long into an instance of rb_cInteger.
Definition: long.h:308
static unsigned long rb_fix2ulong(VALUE x)
Converts a Fixnum into C's unsigned long.
Definition: long.h:252
static void * rb_alloc_tmp_buffer2(volatile VALUE *store, long count, size_t elsize)
This is an implementation detail of RB_ALLOCV_N().
Definition: memory.h:640
static int rb_mul_size_overflow(size_t a, size_t b, size_t max, size_t *c)
Definition: memory.h:525
VALUE type(ANYARGS)
ANYARGS-ed function type.
Definition: cxxanyargs.hpp:56
VALUE rb_newobj(void)
This is the implementation detail of RB_NEWOBJ.
Definition: gc.c:2826
void rb_copy_generic_ivar(VALUE clone, VALUE obj)
Copies the list of instance variables.
Definition: variable.c:1736
VALUE rb_newobj_of(VALUE klass, VALUE flags)
This is the implementation detail of RB_NEWOBJ_OF.
Definition: gc.c:2832
static long RARRAY_EMBED_LEN(VALUE ary)
Queries the length of the array.
Definition: rarray.h:297
void rb_ary_detransient(VALUE a)
Destructively converts an array of transient backend into ordinal one.
Definition: array.c:458
static long rb_array_len(VALUE a)
Queries the length of the array.
Definition: rarray.h:317
static bool RARRAY_TRANSIENT_P(VALUE ary)
Queries if the array is a transient array.
Definition: rarray.h:364
static int RARRAY_LENINT(VALUE ary)
Identical to rb_array_len(), except it differs for the return type.
Definition: rarray.h:343
static void RARRAY_ASET(VALUE ary, long i, VALUE v)
Assigns an object in an array.
Definition: rarray.h:590
static VALUE * RARRAY_PTR(VALUE ary)
Wild use of a C pointer.
Definition: rarray.h:570
@ RARRAY_EMBED_LEN_SHIFT
Where ::RARRAY_EMBED_LEN_MASK resides.
Definition: rarray.h:165
static VALUE RBASIC_CLASS(VALUE obj)
Queries the class of an object.
Definition: rbasic.h:152
@ RVALUE_EMBED_LEN_MAX
Max possible number of objects that can be embedded.
Definition: rbasic.h:55
int rb_big_sign(VALUE num)
The "sign" of a bignum.
Definition: bignum.c:6788
static bool RBIGNUM_NEGATIVE_P(VALUE b)
Checks if the bignum is negative.
Definition: rbignum.h:74
static bool RBIGNUM_POSITIVE_P(VALUE b)
Checks if the bignum is positive.
Definition: rbignum.h:61
VALUE rb_data_object_wrap(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
This is the primitive way to wrap an existing C struct into RData.
Definition: gc.c:2978
static VALUE rb_data_object_alloc(VALUE klass, void *data, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
Definition: rdata.h:367
static VALUE rb_data_object_make(VALUE klass, RUBY_DATA_FUNC mark_func, RUBY_DATA_FUNC free_func, void **datap, size_t size)
This is an implementation detail of Data_Make_Struct.
Definition: rdata.h:358
VALUE rb_data_object_zalloc(VALUE klass, size_t size, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
Identical to rb_data_object_wrap(), except it allocates a new data region internally instead of takin...
Definition: gc.c:2986
void(* RUBY_DATA_FUNC)(void *)
This is the type of callbacks registered to RData.
Definition: rdata.h:108
static VALUE rb_obj_wb_unprotect(VALUE x, const char *filename, int line)
This is the implementation of RB_OBJ_WB_UNPROTECT().
Definition: rgengc.h:363
void rb_gc_writebarrier(VALUE old, VALUE young)
This is the implementation of RB_OBJ_WRITE().
Definition: gc.c:8721
void rb_gc_writebarrier_unprotect(VALUE obj)
This is the implementation of RB_OBJ_WB_UNPROTECT().
Definition: gc.c:8757
static bool RB_OBJ_PROMOTED(VALUE obj)
Tests if the object is "promoted" – that is, whether the object experienced one or more GC marks.
Definition: rgengc.h:343
static bool RB_OBJ_PROMOTED_RAW(VALUE obj)
This is the implementation of RB_OBJ_PROMOTED().
Definition: rgengc.h:323
VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone)
This is the implementation detail of RHASH_SET_IFNONE.
Definition: hash.c:99
struct st_table * rb_hash_tbl(VALUE hash, const char *file, int line)
This is the implementation detail of RHASH_TBL.
Definition: hash.c:1621
size_t rb_hash_size_num(VALUE hash)
This is the implementation detail of RHASH_SIZE.
Definition: hash.c:2986
@ ROBJECT_EMBED_LEN_MAX
Max possible number of instance variables that can be embedded.
Definition: robject.h:84
static uint32_t ROBJECT_NUMIV(VALUE obj)
Queries the number of instance variables.
Definition: robject.h:145
static VALUE * ROBJECT_IVPTR(VALUE obj)
Queries the instance variables.
Definition: robject.h:171
static VALUE RREGEXP_SRC(VALUE rexp)
Convenient getter function.
Definition: rregexp.h:103
static char * RREGEXP_SRC_END(VALUE rexp)
Convenient getter function.
Definition: rregexp.h:163
static long RREGEXP_SRC_LEN(VALUE rexp)
Convenient getter function.
Definition: rregexp.h:144
static char * RREGEXP_SRC_PTR(VALUE rexp)
Convenient getter function.
Definition: rregexp.h:125
VALUE rb_str_export_locale(VALUE obj)
Identical to rb_str_export(), except it converts into the locale encoding instead.
Definition: string.c:1266
char * rb_string_value_cstr(volatile VALUE *ptr)
Identical to rb_string_value_ptr(), except it additionally checks for the contents for viability as a...
Definition: string.c:2575
static long RSTRING_EMBED_LEN(VALUE str)
Queries the length of the string.
Definition: rstring.h:423
static int RSTRING_LENINT(VALUE str)
Identical to RSTRING_LEN(), except it differs for the return type.
Definition: rstring.h:554
static char * RSTRING_END(VALUE str)
Queries the end of the contents pointer of the string.
Definition: rstring.h:528
VALUE rb_string_value(volatile VALUE *ptr)
Identical to rb_str_to_str(), except it fills the passed pointer with the converted object.
Definition: string.c:2459
static long RSTRING_LEN(VALUE str)
Queries the length of the string.
Definition: rstring.h:484
VALUE rb_str_export(VALUE obj)
Identical to rb_str_to_str(), except it additionally converts the string into default external encodi...
Definition: string.c:1260
char * rb_string_value_ptr(volatile VALUE *ptr)
Identical to rb_str_to_str(), except it returns the converted string's backend memory region.
Definition: string.c:2470
VALUE rb_str_to_str(VALUE obj)
Identical to rb_check_string_type(), except it raises exceptions in case of conversion failures.
Definition: string.c:1570
static char * RSTRING_PTR(VALUE str)
Queries the contents pointer of the string.
Definition: rstring.h:498
static long RSTRUCT_LEN(VALUE st)
Returns the number of struct members.
Definition: rstruct.h:94
static VALUE RSTRUCT_SET(VALUE st, int k, VALUE v)
Resembles Struct#[]=.
Definition: rstruct.h:104
static VALUE RSTRUCT_GET(VALUE st, int k)
Resembles Struct#[].
Definition: rstruct.h:114
VALUE rb_struct_aset(VALUE st, VALUE k, VALUE v)
Resembles Struct#[]=.
Definition: struct.c:1221
VALUE rb_struct_size(VALUE st)
Returns the number of struct members.
Definition: struct.c:1474
VALUE rb_struct_aref(VALUE st, VALUE k)
Resembles Struct#[].
Definition: struct.c:1183
static bool RTYPEDDATA_P(VALUE obj)
Checks whether the passed object is RTypedData or RData.
Definition: rtypeddata.h:540
VALUE rb_data_typed_object_wrap(VALUE klass, void *datap, const rb_data_type_t *type)
This is the primitive way to wrap an existing C struct into RTypedData.
Definition: gc.c:2994
VALUE rb_data_typed_object_zalloc(VALUE klass, size_t size, const rb_data_type_t *type)
Identical to rb_data_typed_object_wrap(), except it allocates a new data region internally instead of...
Definition: gc.c:3002
static VALUE rb_data_typed_object_alloc(VALUE klass, void *datap, const rb_data_type_t *type)
Definition: rtypeddata.h:599
static VALUE rb_data_typed_object_make(VALUE klass, const rb_data_type_t *type, void **datap, size_t size)
While we don't stop you from using this function, it seems to be an implementation detail of TypedDat...
Definition: rtypeddata.h:590
static const struct rb_data_type_struct * RTYPEDDATA_TYPE(VALUE obj)
Queries for the type of given object.
Definition: rtypeddata.h:563
short rb_num2short(VALUE num)
Converts an instance of rb_cNumeric into C's short.
Definition: numeric.c:3340
unsigned short rb_num2ushort(VALUE num)
Converts an instance of rb_cNumeric into C's unsigned short.
Definition: numeric.c:3358
short rb_fix2short(VALUE num)
Identical to rb_num2short().
Definition: numeric.c:3349
unsigned short rb_fix2ushort(VALUE num)
Identical to rb_num2ushort().
Definition: numeric.c:3368
static short rb_num2short_inline(VALUE x)
Identical to rb_num2short().
Definition: short.h:105
static bool RB_STATIC_SYM_P(VALUE obj)
Checks if the given object is a static symbol.
static bool RB_TEST(VALUE obj)
Emulates Ruby's "if" statement.
static bool RB_FIXNUM_P(VALUE obj)
Checks if the given object is a so-called Fixnum.
static bool RB_IMMEDIATE_P(VALUE obj)
Checks if the given object is an immediate i.e.
static bool RB_SPECIAL_CONST_P(VALUE obj)
Checks if the given object is of enum ruby_special_consts.
static VALUE rb_special_const_p(VALUE obj)
Identical to RB_SPECIAL_CONST_P, except it returns a VALUE.
@ RUBY_Qtrue
@ RUBY_SPECIAL_SHIFT
Least significant 8 bits are reserved.
@ RUBY_FIXNUM_FLAG
Flag to denote a fixnum.
@ RUBY_Qnil
@ RUBY_FLONUM_MASK
Bit mask detecting a flonum.
@ RUBY_FLONUM_FLAG
Flag to denote a flonum.
@ RUBY_Qundef
Represents so-called undef.
@ RUBY_SYMBOL_FLAG
Flag to denote a static symbol.
@ RUBY_IMMEDIATE_MASK
Bit mask detecting special consts.
@ RUBY_Qfalse
static bool RB_NIL_P(VALUE obj)
Checks if the given object is nil.
static bool RB_FLONUM_P(VALUE obj)
Checks if the given object is a so-called Flonum.
static VALUE RB_ST2FIX(st_data_t i)
Converts a C's st_data_t into an instance of rb_cInteger.
Definition: st_data_t.h:59
const VALUE ary[RARRAY_EMBED_LEN_MAX]
Embedded elements.
struct RBasic basic
Basic part, including flags and class.
const VALUE shared_root
Parent of the array.
long capa
Capacity of *ptr.
long len
Number of elements of the array.
const VALUE * ptr
Pointer to the C array that holds the elements of the array.
Ruby's object's, base components.
Definition: rbasic.h:64
const VALUE klass
Class of an object.
Definition: rbasic.h:88
VALUE flags
Per-object flags.
Definition: rbasic.h:77
RUBY_DATA_FUNC dfree
This function is called when the object is no longer used.
void * data
Pointer to the actual C level struct that you want to wrap.
RUBY_DATA_FUNC dmark
This function is called when the object is experiencing GC marks.
struct RBasic basic
Basic part, including flags and class.
Ruby's File and IO.
struct RBasic basic
Basic part, including flags and class.
struct rb_io_t * fptr
IO's specific fields.
Ruby's ordinal objects.
struct st_table * iv_index_tbl
This is a table that holds instance variable name to index mapping.
struct RBasic basic
Basic part, including flags and class.
VALUE * ivptr
Pointer to a C array that holds instance variables.
uint32_t numiv
Number of instance variables.
VALUE ary[ROBJECT_EMBED_LEN_MAX]
Embedded instance variables.
Ruby's regular expression.
struct RBasic basic
Basic part, including flags and class.
const VALUE src
Source code of this expression.
struct re_pattern_buffer * ptr
The pattern buffer.
unsigned long usecnt
Reference count.
Ruby's String.
struct RBasic basic
Basic part, including flags and class.
long capa
Capacity of *ptr.
long len
Length of the string, not including terminating NUL character.
VALUE shared
Parent of the string.
char * ptr
Pointer to the contents of the string.
"Typed" user data.
const rb_data_type_t * type
This field stores various information about how Ruby should handle a data.
VALUE typed_flag
This has to be always 1.
void * data
Pointer to the actual C level struct that you want to wrap.
struct RBasic basic
The part that all ruby objects have in common.
This is the struct that holds necessary info for a struct.
size_t(* dsize)(const void *)
This function is to query the size of the underlying memory regions.
RUBY_DATA_FUNC dfree
This function is called when the object is no longer used.
void * data
Type-specific static data.
void * reserved[1]
This field is reserved for future extension.
RUBY_DATA_FUNC dcompact
This function is called when the object is relocated.
RUBY_DATA_FUNC dmark
This function is called when the object is experiencing GC marks.
const char * wrap_struct_name
Name of structs of this kind.
VALUE flags
Type-specific behavioural characteristics.
const rb_data_type_t * parent
Parent of this class.
Ruby's IO, metadata and buffers.
Definition: io.h:99
This is an implementation detail of rbimpl_size_mul_overflow().
Definition: st.c:133
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
Definition: value.h:52
uintptr_t VALUE
Type that represents a Ruby object.
Definition: value.h:40
static enum ruby_value_type rb_type(VALUE obj)
Identical to RB_BUILTIN_TYPE(), except it can also accept special constants.
Definition: value_type.h:224
static enum ruby_value_type RB_BUILTIN_TYPE(VALUE obj)
Queries the type of the object.
Definition: value_type.h:181
static bool RB_FLOAT_TYPE_P(VALUE obj)
Queries if the object is an instance of rb_cFloat.
Definition: value_type.h:263
static bool RB_SYMBOL_P(VALUE obj)
Queries if the object is an instance of rb_cSymbol.
Definition: value_type.h:306
static void Check_Type(VALUE v, enum ruby_value_type t)
Identical to RB_TYPE_P(), except it raises exceptions on predication failure.
Definition: value_type.h:432
static bool rb_integer_type_p(VALUE obj)
Queries if the object is an instance of rb_cInteger.
Definition: value_type.h:203
static bool RB_DYNAMIC_SYM_P(VALUE obj)
Queries if the object is a dynamic symbol.
Definition: value_type.h:286
static bool RB_TYPE_P(VALUE obj, enum ruby_value_type t)
Queries if the given object is of given type.
Definition: value_type.h:375
@ RUBY_T_SYMBOL
Definition: value_type.h:134
@ RUBY_T_MATCH
Definition: value_type.h:127
@ RUBY_T_MODULE
Definition: value_type.h:117
@ RUBY_T_ICLASS
Hidden classes known as IClasses.
Definition: value_type.h:140
@ RUBY_T_MOVED
Definition: value_type.h:142
@ RUBY_T_FIXNUM
Integers formerly known as Fixnums.
Definition: value_type.h:135
@ RUBY_T_IMEMO
Definition: value_type.h:138
@ RUBY_T_NODE
Definition: value_type.h:139
@ RUBY_T_OBJECT
Definition: value_type.h:115
@ RUBY_T_DATA
Definition: value_type.h:126
@ RUBY_T_FALSE
Definition: value_type.h:133
@ RUBY_T_UNDEF
Definition: value_type.h:136
@ RUBY_T_COMPLEX
Definition: value_type.h:128
@ RUBY_T_STRING
Definition: value_type.h:119
@ RUBY_T_HASH
Definition: value_type.h:122
@ RUBY_T_NIL
Definition: value_type.h:131
@ RUBY_T_CLASS
Definition: value_type.h:116
@ RUBY_T_ARRAY
Definition: value_type.h:121
@ RUBY_T_MASK
Bitmask of ruby_value_type.
Definition: value_type.h:144
@ RUBY_T_RATIONAL
Definition: value_type.h:129
@ RUBY_T_ZOMBIE
Definition: value_type.h:141
@ RUBY_T_BIGNUM
Definition: value_type.h:124
@ RUBY_T_TRUE
Definition: value_type.h:132
@ RUBY_T_FLOAT
Definition: value_type.h:118
@ RUBY_T_STRUCT
Definition: value_type.h:123
@ RUBY_T_NONE
Non-object (swept etc.)
Definition: value_type.h:113
@ RUBY_T_REGEXP
Definition: value_type.h:120
@ RUBY_T_FILE
Definition: value_type.h:125
void * ruby_xrealloc(void *ptr, size_t newsiz)
Resize the storage instance.
Definition: gc.c:14191
void * ruby_xrealloc2(void *ptr, size_t newelems, size_t newsiz)
Identical to ruby_xrealloc(), except it resizes the given storage instance to newelems * newsiz bytes...
Definition: gc.c:14201
void ruby_xfree(void *ptr)
Deallocates a storage instance.
Definition: gc.c:12226
void * ruby_xmalloc2(size_t nelems, size_t elemsiz)
Identical to ruby_xmalloc(), except it allocates nelems * elemsiz bytes.
Definition: gc.c:14171
void * ruby_xmalloc(size_t size)
Allocates a storage instance.
Definition: gc.c:14161
void * ruby_xcalloc(size_t nelems, size_t elemsiz)
Identical to ruby_xmalloc2(), except it returns a zero-filled storage instance.
Definition: gc.c:14181